Apple Mail transfers deleted gmail to Archive
I have two gmail accounts that I read and through AppleMail along with my other email. When I delete gmails, some go to the Archive account for that gmail and some go the Trash. Those that go to the Trash usually are deleted after 30 days. However some of the deleted gmails wind up in the Archive for the corresponding gmail account. I find the behavior unpredictable; some gmail that I delete winds up in Trash (where it normally is deleted after a month) but other deleted mail winds up in Archive for that gmail account where it is not deleted automatically and accumulates.
Normally I leave all email I save in the InBox for several months before moving it to an ON MY MAC mailbox (usually one for each year) for long-term storage, where it accumulates. At least some of the gmail that I transfer to the Yearly (e.g.,2024 Old Mail) account also winds up in the Archive for that gmail account.
I also move some incoming less-important email from one gmail account to separate ON MY MAC folder, where I read it read and usually delete it. However, that is duplicated in the Archive for that gmail account, where it is the UNREAD mark is not removed after I red it in the ON MY MAC folder, so I have to remove it manually to delete it.
What's going on here and how can I control it better? I know Apple Mail maintains links to email stored elsewhere in memory, but some of the Gmail I trash appears to linger somewhere after the trash is supposed to be emptied.
Thanks
Mac mini, macOS 15.7