Have you scoped them to make sure they are fungus gnats and not winged root aphids? Mosquito dunks have worked every time for over a decade when I've had them during summer.
Just an update on the fungus gnat issue. I did 2 applications of Azamax and killed them. It took a couple weeks to really work but also damaged quite a few leaves at the same time. This round I tried a product called Microbe Lift by microbe life hydro. I talked to the owner of the company Brett and he said to use it at a rate of .5ml per gallon once a week for preventative and I’m glad to say it works awesome and haven’t seen a single fly or any other bug for that matter since I started using it. Also it doesn’t harm your plants at all. He said for infestations you can go as high as 1ml per gallon