Color selection for Latex (MathJAX) in preview mode

I have been using a color theme with slight modifications from long. The new update broke few things, and I am unable to fix the same.
I use live preview mode while editing, and I generally don’t change views. It is always editing in live preview mode.
Now when I use LaTex with $ followed by $, when editing, the background becomes all black, and it is hard to edit.
In the screenshot attached, when I am editing $x=y+3$ the background is black, and I am unable to see the cursor. In the next line (I have just copy pasted the above line), after I move away from the line, everything is fine.
What should I add in my CSS to fix this?
Screen Shot 2022-10-18 at 10.53.52 AM

Things I have tried

I have tried changing all the colors mentioned in my CSS, and nothing seems to effect it.
Also, I have tried looking into the source by using Cmd+Option+I but haven’t been able to figure out what is triggering this black background.

What I’m trying to do