IMAP Email Works on Old Outlook, Not New or Android App - Why?

I’m having an issue with my IMAP email setup. Despite using the same settings, I can access my email on the old Outlook Windows app, but not on the new Outlook app or the Android app. Everything was working fine until I opened the new Outlook app on my desktop and got logged out of all accounts. Now, I’m unable to log back in. Strangely, the old desktop app still works fine. I had also set up my Android app, but now I’m having trouble logging in there too.