Paste $x$ text into the first line so that it becomes:
$x$ text
$x$
Note: Don’t move the cursor inside the formula to expand it.
Type anything on the first line. The $x$ you just pasted gets unexpectedly deleted.
Description
This issue occurs with any formula (inline or block) $x$ or even $$x$$.
If you paste $x$text (where text can be anything) before the last $x$ — without moving the cursor inside the formula to expand it — and then type anything on the same line, the $x$ you just pasted gets unexpectedly deleted.