@alma eyre Apology for the inconvenience with this issue. I have followed the document and Prerequisites but couldn't reproduce the issue at my end.
As per the error, it is coming from the azure sandbox account and the user for which the sandbox account was activated doesn't exist. The sandbox account is activated for a few hours (4 hr) and the error could be observed if you perform any operation on the sandbox subscription post the sandbox account is deactivated.
Selected user account does not exist in tenant 'Microsoft Learn Sandbox' and cannot access the application 'aebc6443-996d-45c2-90f0-388ff96faa56' in that tenant. The account needs to be added as an external user in the tenant first. Please use a different account.
As you have mentioned that you have tried creating the free account still it didn't help. I will suggest you to perform the below steps to sign out from the vs code extension and sign in again with your free trial azure subscription and confirm if you still observe the issue.
- Go to the Azure portal and sign out (https://portal.azure.com/)
- Now open Visual Studio and Open the Command Palette (Ctrl + Shift + P) --> search for Azure: Sign Out and click on it. It will signout you from the Visual Studio extension and you can verify the same by Azure extension as you will see the sign in option.
- Sign in to the Azure portal and your extension should show your subscription (for the testing I have used the sandbox environment that I have activated)
Hope the above helps you to sign in to VS code. If you still facing the issue then please refer to my private comment so I can connect with you offline to resolve the issue.
Feel free to get back to me if you need any assistance.