Hi Fusion007,
To clarify, do you use these Office 365 email accounts on other devices besides your iMac? If yes, do you notice the same issue there with deleted emails as well? Knowing this can help show if the issue is server-side or your iMac itself.
If you haven't yet, one step you can take is to quit the Mail app from the menu bar then restart your iMac. It can seem like a simple step, but it can sometimes help resolve issues.
"Shut down
Do any of the following:
- Choose Apple menu > Shut Down.
If you don’t want the app windows you currently have open to reopen when you restart your Mac and sign in, deselect “Reopen windows when logging back in.”
- Press and hold the power button until you see the restart, sleep, or shut down dialog, then click Shut Down, or press Return.
If you don’t want the app windows you currently have open to reopen when you restart your Mac and sign in, deselect “Reopen windows when logging back in.”
- If your Mac won’t shut down, press and hold the power button for 6 seconds to force a shutdown.
Important: If you force a shutdown, you may lose unsaved changes in open documents."
Those steps are from this article: Log out, sleep, restart, and shut down Mac - Apple Support
Another step you can take is to test this issue in a temporary new user. A temporary new user has no settings changed or custom settings and can help isolate if the issue is happening with any user on your iMac or your user specifically. This article shows how to do that, if needed: Set up users, guests, and groups on Mac - Apple Support
Take care.