if you listen to marketing hype, there is a huge difference, with special super duty wire that makes all the difference.
In reality, inverter duty motors are generally sorted out from normal production, as the ones that stood up to somewhat higher voltage surges.........
There is a special testing system for determining motors which are likely to fail the "hipot" test, and find it out before final assembly. I have designed testing equipment of that type. It will find mis-placed insulation, too-close clearances, etc. It will also "grade" stator assemblies for voltage withstand, so that higher grades can be marked as inverter duty.
So in general, there is little difference, except that you generally have more assurance that the insulation sheets between phases etc are all actually in their correct places, and so forth. The hyped-up wire has very little to do with the voltage withstand.
Of course, nothing says that a "standard" motor won't have just as good an insulation withstand.... and you KNOW it has to pass a minimum "hipot" which is considerably above regular mains voltage. The inverter duty ones are just capable of passing a higher hipot than others.
When the motor and VFD are close together, your chances of serious voltage surges is much lower than if they are at a distance of several meters.