Happened to me and I opened up the motor to flip the gear. The previous owner beat me to it and the gear had already been flipped

I ran the car in 2 wheel mode while waiting for my gear from here -
BMW x3 x5 x6 E53 E83 E71 Transfer Case Motor Actuator Kit BMW 27107566296 | eBay
Opened up the actuator motor, reconditioned it and fitted the gear and presto - issue sorted!