Accessing volume from WSL2

My environment is Windows 11 Pro and WSL2 running Ubuntu 20.04. Docker Desktop is v4.12.0.

I currently have


…so, when I spin up docker-compose, any changes to WordPress source located in WSL2 directory, immediately apply to the running container. The changes usually occur in VS Code looking at WSL2 local dir.

Is there a way to have a named volume instead of WSL2 Linux path and have it accessible inside VS Code?

Something like this:


…but in way that is accessible from VS Code connected to WSL2?