Heading style does not always turn off in main editor

I am having an issue when I use styles in the main editor.
Sometimes (but not every time) after using one of the headings styles, then hitting Enter to start a new line, the heading remains turned on when the font should revert to ‘no style’ or whatever has been set as default.
This does not occur every time, and seems a bit random to me. Sometimes deleting the heading and any blank lines between it and the previous paragraph will solve the problem, but other times I can delete all I want but the heading style remains.

I will try to repeat this enough times to get an idea of why it is happening, but I wanted to get a jump-start on a solution.
Thanks for your help.

If you hit enter while in your heading style, is the new line (nevermind how it looks) in no style ? Or still on your heading style ?

Inked2022-02-14 13_31_58-2018 La robe - Scrivener_LI

If it remains on your Heading style rather than going to “no style”, make sure that your Heading style has “none” as its next style :

Inked2022-02-14 13_35_32-Redefine Style (Heading 1)_LI

→ Keep in mind that if your line in Header style has a trailing space at the end, and you happen to have the pointer positioned before that space when hitting the return key, the new/next line will retain the header style rather than reverting to “no style”, no matter what the above mentioned setting is.

Note that ‘Include font family’ is not ticked. Should it be?

The problem recurred this evening:
Using shortcut keys Alt+Shift+5 I turned on ‘heading 2’.
When I was done with the heading line I hit the Enter key.
Normally, this would switch back to ‘No Style’ but instead remained ‘Heading 2’ and the next line was in the heading style. I backspaced to delete any characters that I might have accidentally typed, but that did not solve the problem.

Note that this problem usually occurred when I used a heading style after having written a paragraph in ‘No Style’, then hit Enter to start a new paragraph, and finally activating the style using the shortcut keys.

When the problem appeared this evening, I imported the styles template again, and that seemed to fix it.
Also note that this problem will pop up on any page I create within the project.

Have you investigated what I wrote about the trailing space at the end of your header ? (You could use “show invisibles” for that.)
Note that once this reminiscent space has caused the next paragraph to stick to your header style, to delete it won’t fix that said new paragraph, as the header style is now assigned to it. (Not to mention that the faulty space is at the end of your new paragraph - not at its beginning -, and waiting to strike again…)
→ Next time it happens, have a look and see if there is an undesired space at the end of your new paragraph.

There is no way that could prevent your new paragraph from being a “no style” one, no.