Hey!
In multiplayer games hard to achieve this, because dedicated server cant swicth level and server need know everything about levels for collision test, replication and many more…
Think in a little bit, if server switch map everything will unload, no collisions, no actors etc… so in theory you cant change map runtime, because they will change on clients.
Some games like World Of Warcraft using instancing to allow this. Instancing means players can play in same place, but players will not see others, only group members
Mostly used for raids, dungeons etc.
UE not supporting this naturally (i mean no one click and go option for this) but of course it is possible with huge backend.
This is just a proof of concept, how this structures works…
So lets say you have main world server, and you have world1 server, world2 server i mean physically servers not ue dedicated server
Main world server running ue dedicated server with your main menu map.
If player want join to world1, you send a request to your backend/master server “hey world1 server start new ue dedicatef server with world1 map, because player 1 wanna join”
World1 server start ue server, creating session and give back this session to master server…
If a new player want join world1 and he will join to exist world1 we have a saved session!! And we can join :))
So… big work behind this the connection and communicate between master and world servers/main servers…
Real Question is that: If Two player select storymode, this two player will play together in same server (co op)???
If Answer Yes: that means players will be not disconnected from server and this two player will play together
For this you can do some trick to achieve this!!
Do not change level, add your worlds as sublevel and place each level far enough distance to will be not visible
If player select story mode, just simply teleport him to sublevel location
Of course this is a very hacky solution and you cant use differrent type gamemodes and other features, but maybe work.
Or you can jump in to learn backend and master server - world server - clients networking architecture which is used and named mostly as mmo networking