This has been fixed in Pycharm Community Edition version 2025.1
Release notes:
https://youtrack.jetbrains.com/articles/PY-A-233538361/PyCharm-2025.1-251.23774.444-build-Release-Notes
All 2024 versions have this bug.
2023.2.7 and prior versions are good.