Take a look at the data in the database. Look at the value of a relationship saved by ACF and look at the value the relationship field saved by your code. Make sure they look the same. What you will see is a serialized array value. Make sure the value type for the post IDs is the same. “s” means the value is a string and the post IDs will have enclosed in “”, while “i” means the value is an integer and the post IDs will not be enclosed in “”.