Component not re rendering on press back on browser from different domain

I have component A, and once we land on PAGE A, I am opening other website link in same tab. now when i am pressing back button on other website . its navigated to PAGE A. but component is not rendering. and api is not getting called again.

i have already used useLocation hook to detect the location change. its working in localhost but not working on deployed application.

i also added logs , but logs are not showing/triggering.

  const location = useLocation();

  useEffect(() => {
    initiateKYC();
  }, [location]);