Reduce MOSFET switch off time
The FET is turning off slowly because the only thing driving the gate at that time is 10 k&Omega; impedance.  That forms a rather large time constant with the effective total gate capacitance, which makes the turn-off slow.

The gate of a FET looks capacitive to the driving circuitry.  Slewing the gate voltage quickly therefore requires high current to charge or discharge the gate capacitance.  This is why FET gate drivers are capable of 1 A or more for short periods of time.

To really turn off a FET quickly, you need to actively drive the gate high (for a P channel FET, low for a N channel FET).  Just loosely pulling it high with a high impedance causes a slow transition, as you found out.