Deleting Old Message - Apple Mail

I’m using Apple Mail and SpamSieve on MacOS Sonoma. Periodically a message will not go away in apple mail, and has even frozen the mail app. Any ideas why this happens to some of my hotmail.com emails and any ideas to remove it?

Screenshot:

I see this from time to time, and I think it’s caused by a bug in Mail’s support for Exchange servers. This can happy for any message—it’s not related to SpamSieve.

It may help to set the account in Mail ‣ Settings ‣ Accounts ‣ Mailbox Behaviors to not store the Trash mailbox on the server or to rebuild Mail’s database.