The key does not come out while the car is in D because a solenoid keeps it locked in. This solenoid is probably not clicking in on yours.
Either the solenoid is broken, or you have a loose connection. Probably a loose connection. Take off the plastic cladding on the steering column, and check the wiring to your ignition switch and its loom are all tight. They get loose with age and wear.
Joe
__________________
Black Betty [Bam a Lam!] '93 UK spec, still languishing
Betty
Jersey Girl Silver '92 UK [Channel Isles] 40K
Jersey Girl @ Mersea
Candy Purple Honda Blackbird
Plum Dangerous
White X2 RVR Mitsubishi 1800GDI.
Vantastic
40,000 miles Jersey Girl