Having the web site match the site's (dark) theme to the browser's (dark) theme is a feature, not a bug. If you are using a dark theme in your OS or browser, the web site can assume you'd prefer to match that as the default. But providing a way to opt out would be nice too.
Seems like this is a missing browser feature. Maybe there's some extension for overriding the dark theme setting exposed to websites.
https://github.com/darkreader/darkreader (I'm just a happy user)