Why are you developing in a VM? I guess that would be a deciding factor in how to decide.
I've gone back and forth with containers in development, settling on this: Application code running on the host. Dependencies (Postgres, Redis, etc) running in containers. Every project has a docker-compose.yml file and each service binds to the external port (5432, or whatever).
If you use something like Orbstack, you can make this even nicer by using hostnames for services and not exposing the port on the host.
I find I want my application code easily accessible for debugging tools, where the container may get in the way. I don't normally have to debug my service dependencies but I want their versions and configuration to be reproducible.