You have a theme component added to your dark theme that’s causing the issue. The name of the component is Alternative Logos
It allows you to change the logo based on whether the user is on the light theme or the dark theme.
Head to admin > customize > components, then delete the component.
This function is now a part of Discourse. You can upload the alternative logos in site settings.
That component was created a long time ago and hasn’t been updated in a while. Newer theme components have better safeguards against causing issues like that when they’re deprecated.