I discovered the problem. It wasn’t related to ACF, at all.
I had an error in a pre_get_posts declaration, which was affecting the loop. I was using is_main_query() instead of $query->is_main_query().
I removed the problematic code, and it works like a charm.