Capacitor bank with variable speed motor
If your goal is to reduce the displacement power factor of your plant, you've already accomplished that by the use of variable frequency drives. The line will no longer see the current lag that it would see if the inductance of the motor was placed directly across the line.

However, VFDs have other issues; a standard six-pulse front-end VFD will have the usual rectifier current profile, which doesn't look at all like a sine wave. Your harmonics will likely be quite bad, which you may also be charged for. If you want to correct that, you'll need a filter of some kind. Most VFD manufacturers offer models with active front-ends, which pull sine wave currents out of the line. Many companies also offer passive harmonic filters.

Now, there are other cases where it may make sense to install capacitors in your drive cabinet. If your application is very cyclical, motoring then braking, you might use a large bank of capacitors to store the braking energy for reuse during the next motoring cycle. But that can cause issues with your VFD's precharge circuit. And regenerating that braking energy back to the power line is often more cost effective, depending on the details. Adding capacitance to the DC bus can also make your harmonics worse.