Right now access to /mnt folders in WSL2 is too slow and by default at launch the entire Windows PATH is added to the Linux $PATH so any Linux binary that scans $PATH will make things unbearably slow. #5159
The best for now is using appendWindowsPath=false and adding folders to the $PATH manually. For example for VSCode you only need: export PATH=$PATH:"/mnt/c/Users/onoma/AppData/Local/Programs/Microsoft VS Code/bin"
replacing onoma with your Windows username.
Source: microsoft/WSL#4498 (comment)