It isn't Fox Farms, it's your grow shops supplier. I've been buying FFOF and Light Warrior for years from the same store who has used the same supplier and never a gnat issue.
In the past I've seen FFOF bags sitting outside and in areas they shouldn't be at nurseries and grow shops, it's here and during distribution where the FFOF gets infested and 99% of the time it's not Fox Farms fault.
When I do get a gnat issue if it isn't early veg I don't care, I will just post yellow sticky tape to get the adults and dry out the pots for a good week or two, allowing pots to go almost completely dry. This seems to always cure the issue. Diatomaceous Earth works but it is spendy and I don't like using it for various reasons. I would limit that fix to early vegging plants as that's where the concern would be, other than that time period gnats are just a nuisance.