ProtonMail has transparent encryption and decryption of emails leaving and entering the local system configured for Apple Mail app, using the ProtonMail Bridge. However the caveat is that only one ProtonMail user profile should be present per account under Profiles. If there are multiple ones, Apple Mail gets confused and is not able to pick one among them, taking the mailbox offline. In case you change account details in ProtonMail website, then use the latest profile and remove the older ones under System Preferences -> Profiles.