Go to File -> Settings -> Project: (Project Name) -> Project Structure
Click "Add Content Root", and add the root directory of your project.
This solution works in PyCharm 2025.1.3.1 without turning off this valuable feature.