No line break for inline comment

I would like to have a full-line comment that doesn’t automatically produce a line break.
I often use a comment at the top of my paragraphs (to help me keep the main idea in mind). But Obsidian renders this as a line break where I would like it to be ignored. See the image below (source on left, rendered on right). The %%Comment%% causes a line break and large space between the paragraph and section heading

I wonder if that is caused by a theme, plugin, or an out-of-date installer? Does it work for you in the sandbox vault? What OS and Obsidian version are you using?

This is the text I used, with a screenshot below:

# Section 1
%%Comment%%
This is the beginning.....

# Section 2
This is the beginning....

**LEFT** > Editing

**RIGHT** > Reading

I never noticed this, but I don’t want the line break either. In my tests below, Header 1 and Header 2 do not add a line break for me. (at least in the theme I’m using - Blue Topaz).

The method in Header 2 is preferred by me as you can make your comments as long as you like.

%%Comment before header%% Header 1 %%Comment after header%%

%%This method does not add a line break%% Some text line one

Header 2

%% This method does not add a line break
Some longer Comment
%%
Some text line one

Header 3

%%This method does add a line break%%
Some text line one

This happens for me as well in the Sandbox vault with Strict line breaks (Settings>Editor>Strict line breaks) OFF. Turning it ON produces what you want (I think).