you can flush the soil with neem oil or gnatroll

sand on top does help, yellow sticky traps, work well


get more air movement on your plants, the gnats wouldnt be there
if you didnt have damp soil