As you may know, Microsoft has completely blocked the use of Basich Auth when accessing Exchange Online mailboxes. You can find a detailed document on this subject shared by Microsoft below.
https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online
This situation affects users as follows: Outlook constantly asks for a password even if the password is entered correctly.
Actually, this issue is caused by Outlook not being able to use the Modern Authentication feature. This puts you in a password loop.
To solve this issue, you need to find the following directory in the Windows registry and add the EnableADAL Dword with the value 1. Then just close and open Outlook. Outlook should now be able to bring up the Modern Authentication window. In addition, sometimes it is useful to clear the credentials from the registry and the Windows Credential Manager to bypass Outlook’s cached credentials.
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Identity]
“EnableADAL”=dword:00000001