[FIX] base: remove all groups before adding any groups in settings
[FIX] base: remove all groups before adding any groups in settings

Because of f206714af08 and subsequent commits, adding groups may raise.
Thus, it is always safer to first remove groups and then add new groups.
The converse could raise, making settings save impossible.

Closes #37481
Forward-Port-Of: #37517
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo