Sorry this is more abstraction than I can process.
If you have mailcowboxA and you have imap sync like: gmailA -> mailcowboxA then depend on period settings you will copy content of gmailA into mailcowboxA even if you delete this from mailcowboxA
Edit: you added screen shot. Yes I believe this is your source of problem. Even if you have “Delete from source when completed” check. Gmail just not allow to delete those basic folder (or it will recreated it promptly). I believe you are not able to solved it if you want to keep this sync.