Oh, Gnome 3.38. I'm not sure that version even supported dark mode, only dark themes. I won't comment on aging of Debian ;).
Btw, what version of Firefox are you using? Debian comes with ESR, so chances are, that firefox' "ui.systemUsesDarkTheme = 1" still works (it doesn't in newer releases).