It sounds like there is an issue with the shift interlock solenoid.
When the brake pedal gets depressed to shift out of park, the shift interlock solenoid triggered the interlock to be released.
A faulty solenoid will not allow the interlock to work as designed.
Depending on if your vehicle is a column shift or console shift, the solenoid is located in different spot.
If it is a column shift the solenoid is inside the column. If it a console shift the shift interlock solenoid is located under the shift lever.
I have attached diagrams for your reference.
Please let me know if you have any questions.
Images (Click to enlarge)
Tuesday, October 12th, 2021 AT 7:22 PM