Fungus gnats appear whenever the top layer of medium stays damp between waterings, and it is the larvae feeding on roots that actually cause harm. Letting the surface dry properly solves it more reliably than any spray, and the troubleshooting page on https://kushindicaseeds.com mentions sand toppings and sticky traps as backup. Seedlings suffer far more than established plants. A mature root system barely notices a small population.