I never experienced something like that before but there is something similar if you try to import a .csv file with mathjax (though I think it was due to user error). But I think to remember that a simple Check Database solves this already, which is way faster than your workaround.
If you can consistently reproduce your issue, maybe try Check Database.
Just in case: If you import from a file then the syntax should be \( for <anki-mathjax> and \) for </anki-mathjax>. Essentially, that way you import
\(\sqrt{x}\)
and anki will automatically (without your workaround) convert it to
<anki-mathjax>\sqrt{x}</anki-mathjax>
If you do it the other way around (importing <anki-mathjax>\sqrt{x}</anki-mathjax>) then you’ll have to manually step through each card.
Though I’m surprised Check Database didn’t solve it. I am certain there was some easy way in Anki and thought to remember than Check Database was it; maybe someone else knows more, though.