Hey there TomNYC,
Thanks for reaching out to Apple Support Communities. I understand Mail accounts are going offline unexpectedly. I’ll be happy to help.
Does this seem to affect multiple accounts in Mail or does it always seem to be this same account? Test the issue in both safe mode and a new user account to isolate and possibly resolve this:
Use safe mode to isolate issues with your Mac
How to test an issue in another user account on your Mac
If that doesn’t help, go through the steps in this link to help identify why this is happening:
If a mailbox is offline in Mail on Mac
Another step that may help would be to remove your account from your Mac, restart, and add it back. If you’re unsure whether messages you want to keep are still on the mail server when doing this, move or copy them to a mailbox stored on your Mac (the mailbox appears in the On My Mac section in the Mail sidebar) before you delete the account in Mail. You’ll find more info in these links:
Add or remove email accounts in Mail on Mac
How to turn your Mac on or off
Let me know if this helps.