Block screen when trying to open apps out of home

I’m trying to create an automation so that every time I open financial apps outside of my home, the screen is blocked.
I already created an automation to lock the screen when opening the apps, but I didn’t manage to add the logic for this to work only when I’m out of the house. Do you guys have any idea how I can do it?

Using  shortcuts, set up an automation for on open of the app. Then the shortcut commands would be,

  1. “get current location”
  2. Get zip code from (above) current location
  3. if “zip code” is not
  4. “Go to Home Screen”