How to run vscode in WSL command line
Solution 1:
This is a known issue. The bug-report is found at wsl: allow to run with a non-default user #286.
The last entry in the post dates from May 27, 2021. For the moment, there is no solution by Microsoft, and the bug doesn't even seem to have come to the attention of the developers (yet?).
In another similar bug-report Change vscode user in remote-WSL #3631, the only answer was:
To start the remote window as a different user, you must change the wsl default user. See https://docs.microsoft.com/en-us/windows/wsl/wsl-config#change-the-default-user-for-a-distribution