GitHub supports multiple ways to have a logo displayed depending on dark/light mode. Somehow, any of these options do not seem to work well when the GitHub repository is a Python project uploaded to PyPi.
Here is what I tried, and the effects in PyPi:

Which seems to show the same effect as here on Stack overflow:
I.e., both logos are displayed at the same time on the PyPi page.
Option 2:
<p align="center">
<picture>
<source srcset="https://github.com/coguardio/coguard-cli/raw/master/logo_dark_mode.png" media="(prefers-color-scheme: dark)">
<img src="https://github.com/coguardio/coguard-cli/raw/master/logo.png" alt="Light mode logo" width="500">
</picture>
</p>
This looks in PyPi like the following:
Okay, here is my overarching question to the community: What is the right way to have dark/light logos AND have them correctly displayed in both GitHub and PyPi?