My rules in Mail.app works only when I run them manually. I gues this should not be a case. Rules should work on each sync. On https://support.apple.com/en-gb/guide/mail/mlhlp1017/mac I have found
Mail stops applying rules to a message when it encounters the Stop Evaluating Rules action, or when a message is transferred to another mailbox by rules used on a mail server or computer or device synced to your computer.
Could be Gmail who prevents rules to start?