How to force HTML to render as HTML?

I'm guessing you are swapping back to the richtext editor, I'm not sure if there is a way of forcing anything to remain as part of the process is to convert the html created by the richtext editor into markdown.

If you only use the markdown editor then it will leave any html alone.

Alternatively you could set the entire note as type "html" which will stop the conversation. I made a plugin which I never got around to releasing which can both create html type notes and convert markdown ones (it only converts the database type, not the content). GitHub - Daeraxa/joplin-plugin-toggle-markup: Simple plugin to toggle the markup type of a note.
How to set the default markup language to HTML (instead of markdown) for new notes? - #17 by Daeraxa