If all four players reached the end while the other players wait.

The way I want this to work is that if a player would to escape from the map exit, it would disable the input of the one player who escaped, will put their screen into spectator mode, and will wait for players to exit the gate, until that if all four players reached the exit it would trigger the multiplayer session end. It’s kind of like Dead by daylight just saying.
There any ways I could do that?

Sounds like you want to keep track of how many players have reached the exit, and if all (four) have reached the exit, end the session.

You can use an array to store the players or a integer variable to count them. Because it is multiplayer, I would keep track of this in the game instance (unless I’m mistaken). Assuming that is where your create and end session code lives as well and because game instance exists outside of each player.

If you use an array, you can get references to the specific player and set them into spectator mode and whatever else you like.