Custom Query JSON Error on Execute for Schema

It's a very similar error to this topic, but I created a new topic.

What mikkime23 and I have in common is that we used the json_object method (json_build_object in postgresql). It works well until run a custom query that contains that method, but all custom queries do not work after the query that contains the thawing method fails.

I use a translator because I can't speak English. Please understand even if it's awkward.