I have not tried it but I imagine this would work fine.
Project
Project/venv
Project/src
And then have the whole project as a volume. Then your editor can see the same files as you have in the container.