Only reason I use virtual environments instead of just building everything inside Docker containers is the debug experience, which is not good enough inside a Docker container.
I just do it inside the container with pudb.
When you run a project in a container, you mount the projects directory into the container.
That is nothing my editor cares about. It does not even know it. It works on the files locally on the host os and that's it. The the files are executed somewhere inside a container is none of the editors business.
The system will have a bunch a bunch of (site) packages already installed, and hence you lose control.