I do not disconnect the wires of the supply cable in the motor's contact box if, for instance, I have to make a "high pot" test (against earth) of an induction motor which has only one set of windings and there are only 3 leads. If I measured "near to infinity" resisatance I am satisfied and if the mechanic I am with disapproves my procedure saying "According to rules, you need to disconnect the supply leads in the box", I leave him the pleasure of turning the nuts, upon what, having repeated the test, I report to him, now satisfied too, again "near to infinity."
But, caution: only if contactor(s) are used, not a soft starter (the more so a VFD) !