I looked into it a little further, and I found the following post:
Mac Mail App does not save new smart mail… - Apple Community
The issues can indeed be fixed by turning off the syncing of settings of the "Mail" app to iCloud through "iCloud / iCloud Drive / Options...". The problem is gone as long as you leave the setting turned off. You can turn it on again after setting everything up, but from that moment on new changes to junk / smart mailboxes / rules / signatures are not saved anymore.
For me turning the setting off was itself a bit of a hassle, because also the change of this setting was not saved (it was constantly turned on again). I managed to get it turned off, by first turning it off on my old MacBook. To me it seems the problems have something to do with the fact that the synced settings from Mail on my old MacBook conflict with those from the new MacBook... Hopefully Apple can look into this issue, because this is kind of the idea of syncing. :-)