client.refetchQueries not working in production

I have this weird issue that I’m unable to determine why it’s happening.

I am refetching some queries using the following piece of code

const client = useApolloClient();

const queriesToRefetch = [ 
'QueryName1',
'QueryName2',
...
]

client.refetchQueries({
 include: 'all',
 onQueryUpdated: (observableQuery) => {
  if (queriesToRefetch.some((query) => query === observableQuery.queryName) {
   return true
  }
  return false
 }
})

Basically I refetch all queries but then selectively choose which of those I want to actually refetch.

For a bit of context this is in NextJS and there is a page where the user comes and loads the data which gets stored in the cache. Then goes to another page performs mutations and at the end of these mutations I then run the refetchQueries. This works well locally as I can see the queries being called / refetched in my network tab. The issue is when I build and release this to my test environment and perform the same process it does not have the same results.

I suspect there is some sort of information or detail I am missing regarding this that is causing the behaviours to be different locally vs in an environment.

Any direction or information would be helpful, thanks ahead of time for the support