Change hash sign # font styles only after it's known to be a header

In Obsidian, hash sign # serves 2 functions: MD header marker and Obsidian tag marker.

Use case or problem

Currently if I start typing # in editor mode, font-size and font-weight immediately changes to H1 styling even though I want to start typing #some-tag.

Demo:

Proposed solution

I think it would improve UX if heading styling changes were applied only after typing # (with space) or ## . That way the styling would not jump back-and-forth for user typing a tag. It works the same way in some of the other editors like Panda and it should be very easy to implement.

Demo in Panda:
Screen Recording 2021-10-04 at 08.38.30

Current workaround (optional)

No workaround AFAIK. I believe it requires direct interaction with CodeMirror to accomplish the effect.