Currently the AI automatically disembark any upside down vehicle and there's no way to prevent it, even if the vehicle is perfectly healthy and is simply attached to another object.
Could you please make the code check for isAllowedCrewInImmobile before dismounting the crew?