Calling get_fields() is likely creating an infinite loop.
Add this at the top of your function
remove_filter('acf/format_value/type=post_object', 'my_acf_format_value', 100);
and then add this before your return
add_filter('acf/format_value/type=post_object', 'my_acf_format_value', 100, 3);