The Chrome Extension "Dark Reader" has given me months of dark mode for hundreds of websites to include Stack Overflow. Given the long hours and late nights, it has been invaluable to both my productivity and eyesight.
Ultimately the best option is probably a progressive change in colors through out the day.
I realize it could be other factors as well, but I notice that I can go longer without my dry eyes bugging we with it on then with normal bright pages.
It will render all web pages with dark mode