Microsoft Office 365 Exchange account stops working in Apple Mail on macOS. Apple Mail and Internet Accounts in System Preferences prompt to re-enter Microsoft Exchange account password, but after the correct password is entered, just shows spinning wheel icon indefinitely.
The issue was caused by one or more other old inactive Microsoft Exchange accounts in System Preferences > Interner Accounts. They were disabled and inactive, so not visible in Apple Mail, but were still interfering for some reason. After deleting these inactive accounts, the correct password was accepted immediately and the issue was resolved.