iPhone Mail: deleted Inbox messages keep reappearing
I'm using IMAP. I have several messages that are stuck in my iPhone's Inbox. When I delete one of these messages on my iPhone, it soon reappears in the Inbox. If I move it to another folder, it doesn't actually get moved, and stays in my Inbox.
On my MacBook Air, these messages are not in the Inbox. In Webmail, these messages are not in the Inbox.
On my iPhone, in Mail's Advanced Account settings, my "Deleted Mailbox" is set to TRASH "on the server", and "move discarded messages into:" is set to "Deleted Mailbox". If I set it to "Archive Mailbox", the messages still reappear.
I have tried changing "move discarded messages into:" to "Archive Mailbox", rebooting, changing it back to "Deleted Mailbox" and rebooting. It doesn't fix the problem.
I have an iPhone X running iOS 16.5.1
iPhone X, iOS 16