I am sorry, but we do not officially support these types of hacks. These things are beyond the intended functionality of the app. Hence, I don’t consider this a bug.
Specifically, what you doing is parsed as whole html block. We don’t break it down word by word and see if that word should be threated as markdown input or html input and then recombine everything.
I among others love to use active recall method for studying the content of my notes. Currently, I use VSCode to write questions and answers in the markdown file in the following form:
<details><summary class="question">Define vector 3D product of A and B</summary><span class="answer">
$\vec{A} \times \vec{B} =
\begin{vmatrix}
\vec{i} & \vec{j} & \vec{k} \\
a_{1} & a_{2} & a_{3} \\
b_{1} & b_{2} & b_{3} \\
\end{vmatrix}$


</span></details>
This makes the studying process a lot simpler as single click reveals the answer. Markdown goodies are also not compromised. Latex, images and other things can be rendered inside the answer.
With <span> it’s currently possible to render markdown in Obsidian which is really nice. It would be superb if that <span> (answer) could be wrapped by <details> (question)