Hello
I had the same problema recently trying to call some logistics graphql queries.
After some tickets, VTEX replied me that there are some queries that are privates and that is not possible to use then in production.
My solution was refactor the entire component to use REST APIs instead of graphql.
One of the main differences between myvtex and production environments is that in myvtex, there is always an authentication cookie present in every request, since it is a private environment that you must be logged in to access.
Because of that, some requests that require authentication work fine there, but stop working on prod since the authentication cookie is absent when the user is not logged in to the store. Even if they are logged, their cookie might not be enough to the request, which might require admin permissions.
In your specific scenario, are you sure that users are always logged in production when that query is executed? If not, that might be the problem.
If they are, you might have to create your own backend to handle the frontend requests in a way that the store user’s token is enough to get the data they need.
There is a OMS client ready to use that you could try using in your custom backend (and it has the listOrders method)