Emails keep re-downloading after I delete them
I am trying to clear my emails out on the mail app. Every time I delete thousands of emails the mail app re-downloads them shortly afterwards. It is an iCloud email that I'm trying to delete them from so I know it's on IMAP. I have gone on the iCloud Mail via the browser now and deleted everything through there, hopefully the mail app doesn't download the deleted emails again. I'm just wondering why the mail app does it when I delete emails through there as I'd rather use that app.
MacBook Pro 13″, macOS 13.4