Was doing a sanctum run and shifted through the locked gates. Noticed it only works when you are in the ruined era. Here is a video showcasing it. https://youtu.be/w0NAihE5lUo
Update after testing some more I found you can do this in both era you just have to be precise on your position. This also does not work on every gate. I noticed it often doesn’t work on gates when its open in one era and closed in the other.