Assuming you're using default Mendix functionality without custom microflows (so with the select page for the referense set also generated by Mendix), you still need to commit the object, as Mendix only performs the change in-memory. So yes, you see the result on your screen, but if you don't save the object where the reference set is being set, these changes will not be stored into the database.
Do you press a 'save' button or do you close the page? If you use a microflow to close the page you should commit the object there.
I tried to add a "save button" on the page but the result is the same. The reference object is inside a dataview. Where do I need to put the save button? Inside the page or inside the dataview component?
thanks