Any loose motor wires, or internal connections in the motor will cause havoc.
Because the motor is inductive, any intermittent connection to or within a winding can generate very high voltages, ... read that as 100s or even 1000s of volts, if the connection is interrupted when the current is above quite a low value.
Intermittent shorted turns (in a winding) can create similar problems, especially if the shorted turn gets hot then causes a disconnection that generates a spike.
Shorts may exceed the ratings on the driver also.
In all probability it is the motor or the wiring, but the problem could be IN/ON the pcb.
Look for loose connections.
If it worked for three minutes, then just replacing the chip won't fix it for longer than 3 minutes if the original cause is not remedied.
Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.