I believe your code should be working. Just take attention to advanced custom fields like post object, gallery, repeater, etc as the returned data from the database sometimes different from the posted one, even though they are actually referring to the same value.
Regarding your second question, yes, I think you can use the get_fields() function instead.
I hope this helps 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users