Today I ran into the bug where the desktop version of Skype would automatically log me out within a few seconds after logging in. After some investigation, I found the cause of the problem.
The Skype and Microsoft accounts were linked to each other; after I unlinked the Microsoft account, it worked perfectly.
To unlink, you need to visit the Skype website, log in there, then go to account settings, where you can unlink the Microsoft account. After this, you’ll only be able to log in with your Skype username.

