I remember encountering a similar (if not the same) bug during development. I don't recall what exactly the fix was, but it was related to the CSS variables. Make sure you have all the lastest dark-mode files and aren't overriding them.
An easy way to reproduce this is to set dynamic: false in the config file. With that off, this issue happens until you manually switch it on/off via the button at the top of each page. With it on, everything works as normal. My preference would be to have it react to OS dark mode settings alone without the sunrise/sunset times, so if that's possible that'd be great to have.