Many2Many domain should come from the relation
Normally, the domain of a Many2Many should be also set to the Many2One of the target field of the relation model. This way the constraint is always enforced.
So I think it will be easier to manage if the Many2Many would automatically include the target field one.
The only possible issue is if the target field use also relation model fields.
Otherwise a test to ensure compatibility of domain will be welcomed.