I replace my code with yours, but this code doesn’t work unfortunately.
Using your code, users are able to see others’ posts.
So it does fix the issue I had (advanced custom fields not showing), but now it doesn’t do the core thing it was supposed to do..