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

volumes:
/home/user/Dev/sites/domain-wp:/var/www/html

…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:

volumes:
domain-wp:/var/www/html

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