Modified M2M records are not added to the parent record when saving the parent
Since 361ac7c348d9 only the modified records are added to x2Many.
But in the case of a M2M once a record is opened, modified then saved the modified_fields
set is emptied which won't set the record in the parent M2M field.