How did I find this? I don't know.
Upon logging out and then logging back in of a Mojang account while a Microsoft account is logged in at the same time, the Minecraft Launcher enters offline mode for a few seconds after signing in (around 30 seconds during my tests), until reverting back to online mode.
- Open the Minecraft Launcher (connected to the Internet)
- Make sure you are signed into a Mojang account and a Microsoft account
- Log out of your Mojang account from the dropdown menu in the top left corner of the screen
- Click Add account -> Mojang Login -> sign into your Mojang account
Notice how the Minecraft Launcher appears in offline mode for a few seconds, before switching to online mode by itself
This was not an issue in 2.2.910; this has been introduced in 2.2.1166.
I have set the Environment field to macOS, as I have not tested on a device running Windows yet. I have, however, tested on two different devices running macOS (10.13 and 11.1), and have received the same results.
Yes, the Microsoft account needs to be signed in as well! I could not reproduce the issue when the only account signed in was the Mojang account.