We are facing constant problems with the desktop apps in O365, wheter it’s RDS servers that somehow are Azure joined by a user from login 1001 errors to modern authentication Windows that automatically disappear or other generic error 1001 logon bullshit. We have a tome of registry bullshit with shit like EnableADAL to deleting the AAD appx folder from the user profile and/or reinstalling it through Powershell and so it goes on… usually dicking around with these settings will make it magically work for a few weeks…
The amount of time this costs us and our customers is truly staggering, are we the only shop facing this?
Are you using Trend Antivirus? We just finished a months long fight of very similar symptoms, and it was that our antivirus was deleting the login tokens.
https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/authentication/cannot-sign-in-microsoft-365-desktop-apps
This is what it was for us too.