I've had this problem since July 2021
when I first got the game it would let me log into my account but I had to sign in again each time I opened the game but now it just doesn't work.
to be specific:
when I try to sign in it just says "connecting to your Microsoft account" and then says "unable to connect" after a minute or two.
I've tried deleting my save data, the game itself, the game data, every type of data related to the game, restarting my switch, restarting my wifi router, and attempting to erase my sign in data (it won't let me for some reason?)
every time I try to delete my sign in data it just does nothing.
I apologize if someone already solved this issue and I missed that!
Related issues
Comments

Thank you for your report!
We're tracking this issue in MCPE-120334, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 BDS Wiki – 📖 FAQs