facing an issue with the getAccessTokenSilently method

I am facing an issue while calling the getAccessTokenSilently method. The token is generated successfully, but the process does not move to the next step. Here is my code for your reference. If I remove this method, it works, but I need a new token to update my data. This issue only occurs when running the build version; it works correctly on my localhost.

const companyFormSubmit = (companyFormData: any) => {
    dispatch(
      companyRegisterPost({
        backendApi: backendApi,
        languageCode: i18n.language,
        name: companyFormData.companyName,
        billingAddress: companyFormData.billingAddress,
        city: companyFormData.companyCity,
        postalCode: companyFormData.companyZipcode,
        state: companyFormData.companyState,
        taxNumber: companyFormData.taxNumber,
        faviconIcon: companyFormData.logo,
        portalCountries: [companyFormData.selectedCompanyCountries]
      })
    ).then(async (response: any) => {
      if (response.meta.requestStatus === 'fulfilled') {
        await auth.getAccessTokenSilently({ cacheMode: 'off' }) // new token get
        props.setActiveStep(props.activeStep + 1)
      }
    })
}