The underscore character is used for subscripts in LaTeX expressions. Sometimes Obsidian errantly pairs the underscore with a second underscore, as if it were Markdown.
Proposed solution
Disable markdown pairing within inline LaTeX, or block LaTeX. E.g.
Within a sentence $x_a=1$, or in a block:
$$
x_a=1
$$
Related feature requests
This has been mentioned a couple of times here on the forum, but I don’t see a feature request.
Rather than disabling it completely, I think it should be a separate option nested under “Auto pair Markdown syntax” to enable or disable auto pairing within LaTeX. That way, user’s can choose based on their own preference.