When you try to disconnect the Microsoft 365 account and are getting the "This PC isn't joined to a domain" error, follow the below steps:
- Open the computer Settings, select Accounts, and click on Your Info,
- Select Sign in with a local account instead, enter the password for your Microsoft account to confirm that you are authorized to make the change, and then click Next,
- Go back to Accounts, and go to Access work and school account,
- Retry to disconnect the account,
- Last step, go back and change the login to the Microsoft Account instead of local account.
