@shocked-gamer , I created Issue #18534.
I did some more digging into the javascript, and played with a replica of the relevant HTML and JS.
I found that when the page is reloaded via a REFRESH / F5, browsers Chrome and Edge will always treat the checkbox.click() in the DOMContentLoaded event as an instruction to checkmark the checkbox. However, Firefox seems to remember that the checkbox was already checkmarked, so when it sends that method, Firefox clears the checkmark, putting it back into light mode.
In the Issue, I supplied a slight tweak in the code that will make it correctly set that checkbox to true by not using the .click() method, but instead checkbox.checked = true; . With that, my experiments showed that Chrome, Edge, and Firefox would all remember the Dark Mode state on REFRESH or exit and relaunch. So I think that’s enough.
Please note: this is because Firefox interprets the initial state of the checkbox differently after REFRESH than Chrome/Edge do. So it’s modifying the javascript to overcome a difference in interpretation of the specs between the different browsers.