@leocg I tested this on the latest stable versions of Microsoft Edge, Brave, Google Chrome, and Opera GX, and the issue reproduces consistently across all of them.
I have not tested older versions of those browsers, but an older Opera GX version (the one I'm using now, prior to its recent Chromium update) does not exhibit this issue and has worked correctly for me for several years using the same dark-mode configuration.
This appears to point to a Chromium-level regression.

