Rather, support for transparency in graphics is needed. I've seen the problem with Kindle ebooks too, where chapter headings, that are displayed a graphic, look badly off with any background color other than white.
A solution may be tricky though for the devs. It is obviously appropriate to invert the colors of an equation in dark mode, as it would be for black&white graphics in Kindle apps, but there is no reliable way to distinguish such a graphic from a grayscale photo. Or when embedding equations as pre-rendered raster graphics, some software may inappropriately bake in sub-pixel rendering. This gets even worse, when taking into account the possibility of having colored subexpressions in equations.
A possibility may be to use a basic heuristic: If the image consists predominantly of two grayscale values / a dark gray scale value on transparent background (e.g. black and white, dark gray and white, or black on transparent background) it is probably appropriate to adjust or invert the color in dark mode. The user would however need the ability to explicitly flag images for inversion / not inversion, when the heuristic decides wrong.