application sign-on issues using angular-google-gapi and Google platform.js script

Our application is deployed on GCP (Google Cloud). It uses Google based authentication. Recently since 25th Feb 22 , we have been observing sign in issues
When we hit the developer console on chrome , we see below error
Error is : bundle.js:17014 Type Error: Cannot read properties of undefined (reading ‘setApiKey’)

The error line then points to below api :

This api is further calling Google platform.js script which opens the Google sign in page (the user puts his/her email and then they log in to app post authentication).

This issue is intermittent e.g. it happens for 20 mins and then we clear the chache and cookies and then it goes away but then it comes back again. This workaround does not even work in all attempts and hit and trail works. Not sure what is happening here.