This has become a problem since Microsoft Store apps can't be executed from session 0, i.e. not from a SSH session. Pity.
Fortunately, there's the Remote Tunnel option.
To use it, download the VS Code server and run it on your machine as follows:
./code tunnel
It will ask for a connection to GitHub, which you certainly have. Then it will allow you to tunnel to your remote machine without a SSH hack.
This gives you a near-native experience for running VS Code.
For example, I'm working on machine learning models that make use of CUDA from my small laptop that would not support it at all. This works thanks to my connecting to that remote WSL 2 instance.
Have fun :) m