Office365 account disconnects (only the account that needs two-factor authentication)

It’s not only with office 365, it also happens with gmail, check this issue for more information and error logs and more