Question is; is the referenced object new or existing? If the referenced object is new, it should be committed as well. Mendix performs a auto commit for referenced (new) objects, to maintain the relation for further use in the session. But this will be reverted if the object isn't committed actively later on.
You might also want to take a look at your after-commit activities. Perhaps the associations are reset at some point during the commit event?
Check your access rights. May be the user has no rights to set the relation.