you will need to integrate the fwd/rev relay to turn off the spindle.
when you do M05, the analog voltage is still there and that's why your spindle keeps on moving.
if you have a forward/reverse relay connected to the spindle drive, then it will properly turn on/off.