If you have a digital voltmeter remove the motor from the machine. Put one lead on the motor case and the other on the machine frame, VFD metal case or a grounded location. Turn on the motor and see if there is voltage. It should be zero. Any level of voltage leakage present from the motor case to ground indicates a partially grounded winding and could be the cause of your problems. Just so you know... a 3 phase motor will run with one partially ground winding. Unless the VFD has motor ground fault detection it will just keep working until it shorts out completely.