This just happened to me (M4 MacBook Air, Tahoe 16.5.1, Mail 16.0, IMAP email through my ISP [Knology/WOW] ). I have my iCloud, Gmail and my ISP’s email accounts accessible through my Apple Mail app, so I see messages from all three in Mail. I found a new message (about Google Web App Activity Lawsuit) in my Gmail Junk folder that was not Junk. I ctrl-clicked on the message and chose ‘Move to Inbox’. It disappeared and did not reappear in any of my Inboxes or anywhere else. Luckily, I had glanced at it before moving it and remembered part of the sending email address (epiqnotice).
All my mailboxes are shown at the left of my Apple Mail window. When I entered the sending email address into the ‘Search’ field at the top right of the Apple Mail window, a new option (‘Search All Mailboxes’, which is usually not there) appeared at the top of my list of mailboxes at the left. I clicked on that and executed the search. My missing message appeared in the list of found messages along with a few others from that same sender.
In the displayed columns of data about these messages I could see where they had been found. The others were in a folder under ‘On My Mac’ where I had moved them when I received them months ago (this folder is on my computer, not on any mail server).
The missing message was listed as being in the mailbox ‘All Mail’. I have not created any such mailbox nor do I see it in the list of mailboxes on the left of my Mail window. I manually opened each of my mailboxes (Gmail as well as the others) and did not see the message anywhere. Also, I clicked on the icon for ‘All Mailboxes’ in the left column and it did not appear in the list of messages (even though Search can still find it).
My conclusion is that Apple Mail knows about it (since its Search found it) but when I tried to move the message out of Gmail Junk my Mail app moved it out but didn’t reassign it to another mailbox (I had requested Gmail Inbox). It seems to be orphaned and only a global email search can find it.
I will eventually move it to the same folder On My Mac as the others, but I haven’t moved it yet (since that removes it from the mail server) in case anybody here has any detective suggestions so we might figure out what happened.
Update 2 hours later: The orphaned message has still not appeared in any mailbox including my Gmail Inbox where I told Mail to move it to.
Update next day: I accessed my Gmail via the web and, as with Apple Mail, the orphan message only appears when I click the icon in the left column for ‘All Mail’. It looks like it was Gmail that didn’t properly move it from Gmail Junk to Gmail Inbox.