For starters you have the incorrect cable for the VFD Drive to the Spindle you should not have an open Ground cable, this needs to be a 4 wire shielded cable
Is the Spindle plugs 4th Pin have Ground continuity to the Spindle body, most are not connected inside and this need to be corrected