How do I simplify going through doors in the same scene?

How do I simplify going through doors in the same scene, or how to simplify it with a global variable?

I have it functioning, but I don’t like it, it seems messy. I can go into one door, using a variable to ID it with a “door way check” and teleports the player to the x and y position of the other door and vise versa. I have multiple scenes and plan on having several door ways in each scene and want the door ways to stay within in the same scene. What I don’t like about it is having to repeat this for every in and out in every scene for multiple doors, there has to be a way to simplify it that I am missing. There has to be a way I only have to set it up once somehow maybe with a global variable?

Here is a visual sample as well.