This likely indicates a file permissions problem on your Mac (so that Mail isn’t able to save the rules to disk) or a problem with iCloud syncing (so that your rules are being overwritten from the cloud).
Please use the Save Diagnostic Report command in the Help menu and send me the report file, as described here and I can look into what you should do.
Thanks. This seems to be a different situation than what I’ve seen before. There don’t seem to be any old rules saved in iCloud, and the file permissions seem to be OK. So it’s not clear why Mail hasn’t saved the rules to disk.
You could try clearing out any ACLs just in case there’s one that I’m not seeing. First you will need to grant Full Disk Access to the Terminal app. Then, please open the Terminal application, enter this command (all on one line):
sudo chmod -RN ~/Library/Mail
and press Return. It will ask for your Mac’s administrator password.