Why do dark mode apps flash white?
Because if you pass WM_ERASEBKGND to DefWindowProc(), it will paint it with the DEFAULT_BRUSH, which is WHITE.
Then the app "paints" it dark. So you see flash two frames apart.
This is like the most basic app bug in the world and should never happen. You never see Task Manager's dark graphs flicker, for example.
The problem is that some Windows apps become so complex that there's no longer a single windowproc, and where and how each message is handled is lost in a maze of spaghetti code!
But it's one message.