Set ManyToMany value that is NOT in ModelForm

Where exactly in your view do you have that line?

You set a model field value the same regardless of where you set it:
instance.field_name = value

However, keep in mind that a ManyToManyField is not a field in the model. It’s a reference to a relationship manager for data stored in a “through” table that establishes the connection between the two models. Adding a value to a many-to-many relationship does not affect either of the two related models. It’s only the through table that is being changed.