While fitting the VFD inside the control box is neater
having the VFD external can reduce the electrical noise from the VFD and its wiring
from interfering with the low level logic signals from the BOB
many of the Chinese CNC control boxes have a shock hazard due to the use of a 5 pin plug as the outlet to the spindle motor
Attachment 416116
I would either fit a socket on the box or use a strain relief and connect the motors cable directly to the VFD terminals
also double check the earth wire is connected to the spindle motors case
very often the 4 pin plug on the motor does not have the 4th pin connected !
Attachment 416118
John