Had the exact same problem initially.
Every time I turned the vacuum on or off the cnc controller rebooted.
What solved it for me was to use the same atx power supply for the Arduino as well as the raspberry pi running it.
I think the problem was a ground difference between them + the fact I was using a simple 5v power supply for the pi while the atx power supply is better protected against power spikes.
Hope this helps…