dark mode does not set prefers-color-scheme to dark
Solution 1:
Chrome has an open discussion about it: chrome issue. Electron —VScode uses, had similar issue but fixed now: electron issue. For VSCode and Firefox your issue may based upon versions. Updating may resolve it.