The likely problem is in the key/shift interlock system. The ignition has to receive the proper “transmission is in PARK” signal before it electrically releases the key. Since the car starts and shifts normally, but disconnecting battery power allows the key to come out, the mechanical key cylinder itself is probably okay.
Put the car in PARK and, while turning the key toward LOCK, push the shifter firmly forward into PARK and wiggle it slightly. If the key releases, that strongly points toward the shifter's park-detection/interlock mechanism or cable adjustment.
I'd expect $100–$200 for diagnosis/adjustment, roughly $200–$450 if it's a relatively simple interlock switch/solenoid repair, and around $400–$700 if the complete shifter assembly has to be replaced. Dealer pricing could be higher.
Sep 25, 2026 at 6:08 PM