Random movement of a stepper only when the spindle is running is usually electromagnetic interference, this can be due to inadequate shielding or insecure connections in your motor side VFD/controller/driver/stepper wiring or it can be the interference which the VFD chucks back on the mains messing with the control box through it's mains supply.
One thing which can reduce or eliminate the latter is to use a long extension to power just the VFD from the farthest possible socket from the one supplying your controller box, one on a different ring main would be better still.