I don't notice any "flash of white" (Firefox, Chrome, Safari on Mac; Firefox, Chrome on Android). Not on initial page load, refresh nor toggling between Dark and Light. It seems to just work.
the pages flashes light mode when refreshing the page with dark mode enabled, chrome on windows.
Ohh... yeah that happens. I thought it was describing the entire page flashing as solid white.
Well yes, the entire page flashes white if you have FOUC because you implemented it wrong. And since mobile browsers are usually fullscreened, it means the entire device flashes you; I assume you don't use dark-mode much if you haven't noticed this. But dark-mode users do notice and once in a great while, even complain to you about it.