TF30063:You are not authorized to access dev.azure.com but I can connect
I have encountered the same issue. (I need to switch back and forth between work account and test account). Of course, there could be so many reasons and it could be different for each (cached another account, or modified the password).
To resolve this issue I have two methods/steps.
Step 1 is to clear the credential from credential manager:
Go to Control Panel (with small icon view)-->User Accounts
-->Manage your credentials
(on the left column)-->Select Windows Credentials
-->Scroll down to the Generic Credentials
section and look for your TFS server connection.
Step 2 is to click on the operation that Connects to the Team Projects which is the button/plug icon in the Team Explorer
tab. Then to also right click the project you are getting this issue on and select Connect
:

I also have tried other methods but not work for me, if possible, you can check if it is useful to you:
How To Fix TF30063 Error
Error TF30063: You are not authorized to access