Then there you go. You are probably losing the G30 due to voltage sag.
When you don’t totally lose it then you are in the netherworld of potential data corruption. No idea how well the G30 protects itself from that.
Can your power supply handle the full load and do it quickly? If so then you need to find a way to isolate the motor and the digital circuits. Sometimes a simple cap between power and ground close to the motor helps. Wouldn’t hurt to put more capacitance close to the G30 as well. I have tons of capacitance on mine because my motor can go from idle to 7.5 Amps in a ms. Made sure my battery could dump 10A in less time, but even just inductance in the power cables made me want to slap some extra caps on there. Research bypass capacitors (for the motor) and reservoir capacitors (for the G30).
If all else fails separate your power supplies and systems completely and command the motor with light.