When you board a vehicle, it turns on/off a switch. This switch is the one used on your 'vehicle' events hiding them n such. You merely need to use these same switches to turn 'off' the event that teleports you to another map. This way, you can't cross into the other map with the vehicle.
The demo shows a cave you can move into, but the cave's 'teleport event' is turned off when you are riding the dragon. This way, the dragon doesn't fly into the cave.