I've not looked at my Huanyang VFD for a while, but the two WK boost inverters I've been playing with lately, the cooling fans only create airflow through the heatsink, so don't make any difference to how much dust/dirt/chips end up in the control electronics.

In terms of enclosures, as Voicecoil says, there are other considerations.
For dusty enviroments, I'd prefer to use a filtered fan blowing into and pressurising the enclosure to minimise the amount of dust being drawn in.

VFDs are generally designed to be placed in a clean enviroment/enclosure, so the location of the fan in terms of dust/dirt/chips isn't really a consideration. They're no different to your typical stepper/servo drives, in that regard.