When fields like image fields return integers rather than what they are supposed to return 99.9% of the time this is caused by a pre_get_posts filter that is interfering with ACF.
You need to look in your code for any pre_get_posts filters and alter them to not filter posts when they’re not supposed to be.