Why does 1996 Mercury Tracer's Ignition Switch lock-up and release only when shifter is removed from park position and replaced?

The ignition switch on a 1996 Mercury Tracer might lock up and release only when the shifter is removed from park and then put in the park position again because the sensor is getting worn. This sensor lets the ignition know that the car is in park and it is safe to remove the key. Check the shift position sensor.