Weird behavior when placing a hashtag sign in an internal link reset content

I often create internal links to headings of my notes to cross-reference other places in the note.

Regularly, the text I want to transform as a link already pretty much corresponds to the heading text. So I just select it and create an internal link, which basically corresponds to placing [[my selected text]]. Then I normally need to add # sign in front to make in an in-note reference to some heading.

Steps to reproduce

  1. Select text and trigger internal link command (like via shortcut)
  2. Insert a # sign in front
  3. The text content is reset

Or

  1. Select text and trigger internal link command (like via shortcut)
  2. Insert a # sign somewhere inside
  3. The behavior is unexpected and inconsistent.

Did you follow the troubleshooting guide? [Y]

Expected result

Just insert # sign but do not reset text.

Actual result

20240517 - Screen maps contrib

Environment

SYSTEM INFO:
	Obsidian version: v1.6.3
	Installer version: v1.5.3
	Operating system: Windows 10 Pro 10.0.19045
	Login status: logged in
	Catalyst license: insider
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 0
	Plugins enabled: 0

RECOMMENDATIONS:
	none


Additional information