My Apple Mail bug is with changing passwords on Exchange accounts. I change the password, Apple Mail prompts for the new password, then uses the old one to connect.
I have to quit Apple Mail and use the accounts pane of preference panels and cancel when it prompts for the new password as it has the same bug. Then I can click details and change the password. That works.
Reported many years ago in Sierra.