At longer feeder lengths, standing waves on the feeder due to higher order harmonics in the inverter PWM output can create high voltage across the motor windings.
The exact distance will vary depending on the drive, carrier frequency, etc. The drive supplier can give you some maximum length guidelines.
A filter on the drive output will attenuate the higher frequency components and reduce this effect.