This sounds like an issue in the ignition lock solenoid. That is what keeps the key from being removed if the vehicle is not in park.
Take a look at this and let us know what questions you have. I included the testing and a TSB for this issue.
Images (Click to enlarge)
Sep 1, 2020 at 5:38 PM