After a while I managed to make the extension work with these changes:
1.Download the .vsix from https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl and install manually from the extensions section
2.In the file: C:\Users\%USERNAME%\.vscode-oss\extensions\ms-vscode-remote.remote-wsl-0.66.3\scripts\wslDownload.sh replace all "commit:$COMMIT" with "latest"
3.Open the extension And wait the download of the .vscodium-server within WSL user profile
4.In the file C:\Users\%USERNAME%\.vscode-oss\extensions\ms-vscode-remote.remote-wsl-0.66.3\scripts\wslServer.sh replace 'SERVER_APPNAME=$3' with 'SERVER_APPNAME="code-server"'
5.In the file \\wsl$\Ubuntu\%USERNAME%\.vscodium-server\bin\%COMIT_ID%\product.json replace the value of the "commit": with the same value of "commit": found in your %VSCODIUM_INSTALLATION_DIRECTORY%\VSCodium\resources\app\product.json
6.In the file \\wsl$\Ubuntu\%USERNAME%\.vscodium-server\bin\%COMIT_ID%\out\vs\server\node\server.main.js search "if(!ye){if(this._environmentService.isBuilt)return ie("Unauthorized client refused")" and change the first if condition from '!ye' to 'false'
After a while I managed to make the extension work with these changes:
1.Download the .vsix from https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl and install manually from the extensions section
2.In the file: C:\Users\%USERNAME%\.vscode-oss\extensions\ms-vscode-remote.remote-wsl-0.66.3\scripts\wslDownload.sh replace all "commit:$COMMIT" with "latest"
3.Open the extension And wait the download of the .vscodium-server within WSL user profile
4.In the file C:\Users\%USERNAME%\.vscode-oss\extensions\ms-vscode-remote.remote-wsl-0.66.3\scripts\wslServer.sh replace 'SERVER_APPNAME=$3' with 'SERVER_APPNAME="code-server"'
5.In the file \\wsl$\Ubuntu\%USERNAME%\.vscodium-server\bin\%COMIT_ID%\product.json replace the value of the "commit": with the same value of "commit": found in your %VSCODIUM_INSTALLATION_DIRECTORY%\VSCodium\resources\app\product.json
6.In the file \\wsl$\Ubuntu\%USERNAME%\.vscodium-server\bin\%COMIT_ID%\out\vs\server\node\server.main.js search "if(!ye){if(this._environmentService.isBuilt)return ie("Unauthorized client refused")" and change the first if condition from '!ye' to 'false'