ACF Update_field() update the field but changes are not seen in backend or rest api

I have a custom field for User type where I can link an attachement ID. I’m trying to save the attachment ID programmatically and it looks like it works, because when I run get_field($my_field) I have the right value. However the changes are not seen in the backend or in rest api, it still show the old value. I’m baffled, what could I be doing wrong?

Here is my code:

But in the backend there is still the old link to another image, and in the rest response for wp-json/wp/v2/users/2 also: