Received some help on reddit and it worked so I hope it will work for you too.
First I signed my Microsoft account out in both the Microsoft store and Xbox app. Secondly I uninstalled the Minecraft Launcher and all my Xbox apps (I think its only needed to uninstall the main Xbox app). I then restarted my PC and logged into my Microsoft account in the Microsoft store. Without installing any of my Xbox apps I downloaded the Minecraft Launcher from the store and launched it. Sign in with your Minecraft account and everything should be working as it should be.
Received some help on reddit and it worked so I hope it will work for you too.
First I signed my Microsoft account out in both the Microsoft store and Xbox app. Secondly I uninstalled the Minecraft Launcher and all my Xbox apps (I think its only needed to uninstall the main Xbox app). I then restarted my PC and logged into my Microsoft account in the Microsoft store. Without installing any of my Xbox apps I downloaded the Minecraft Launcher from the store and launched it. Sign in with your Minecraft account and everything should be working as it should be.