UDN2981 - Discharge issues
There is no pull-down resistor inside the darlington output stage hence, if you just connect your o-scope as load, the output voltage will drop quite slowly: -

 

Try connecting a 1 kohm resistor as load and see what happens.