If you’re using a relationship field I don’t see anything wrong with your code.
If you changed the field type, did you also go an change all of the values already saved to the existing field? If not the data in those fields will not be saved correctly. That’s the only thing I can think of that might cause it to not work.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users