You may be signed in to another Microsoft online service, and this may be preventing you from signing out.
To sign out of all Microsoft online services.
- Browse to https://login.microsoftonline.com/logout.srf and sign out.
- Browse to https://login.live.com/logout.srf and sign out.
If you still can’t sign out clear the cookies of your web browser and try again to sign out.
More info can be found here Problems when signing out of Office 365, Azure, or Intune in a web browser – Office 365 | Microsoft Docs