That’s strange. Any chance you can check with WordPress support to see if they have any ideas?
If they can provide the code that works in a twenty series default theme, it would work in GP as well as the post loop is completely handled by WordPress 🙂