Hello sienaman,
Thank you for reaching out to Apple Support Communities.
We were able to find these helpful steps:
"Change Mailbox Behaviors settings in Mail on Mac
Use Mailbox Behaviors settings in Mail to change where draft, sent, junk, deleted, and archived messages for an email account are stored.
To change these settings in the Mail app on your Mac, choose Mail > Settings, click Accounts, then click Mailbox Behaviors.
Note: Mail stores messages in the mailbox you specify for each option.
- If you select a mailbox on the mail server, the messages are available when you use your email account on another computer. Mail selects the best mailbox for your account; before choosing a different server mailbox, check with your email account provider.
- If you select an On My Mac mailbox, the messages are stored on your Mac and are available only there.
The settings shown vary depending on your account type."
Additional details can be found here: Change Mailbox Behaviors settings in Mail on Mac
Are you selecting a mailbox on your Mac or mail server? Which email account type are you experiencing this with? Are you experiencing this with multiple accounts? Also, which macOS version are you currently using?
Cheers!