What could cause the mosfet to burn out in my motor driver?
Maybe your circuit stresses the MOSFET during switching. I could see two possible problems.

First, you placed a 100nF capacitor across the freewheeling diode. When the MOS is turned on, it has to dissipate an amount of energy equal to
$$ \frac{1}{2} C_5 (24)^2 $$
plus the energy due to the recovery charge of the diode. To avoid this, you should have inserted an inductor in series between the diode and C5.

Then, the inductance of the loop constituted by the MOS, D1 and the decoupling capacitor C6 should be kept as low as possible, to limit overvoltages across the MOS during turn off. I'm afraid it is not the case in your design, because this loop also includes a switch, and possibly the wires between this switch and the PCB. I would have put the interlock AFTER diode D1.

Edit: these are the changes I would advise :







simulate this circuit &ndash; Schematic created using CircuitLab