To illustrate the problem, please see the differences in request headers between app running on localhost and on Azure Static Web App service.
The environment variables, locally, are held in a '.env' file. On Azure these were held in GitHub secrets and referenced under the 'env:' section of the Actions workflow. There is another API specified in the same way and that works fine, but the working API is called at build time, while the problematic one is called at runtime.
So, to see if it will resolve this, for the runtime environment variables, I now specify these under Azure Application Settings. This still has not resolved the issue
This specific issue was resolved by ensuring that browser accessed environment variables start with 'GATSBY_' as mentioned here: https://www.gatsbyjs.com/docs/how-to/local-development/environment-variables/#accessing-environment-variables-in-the-browser