Are you using some kind of moisture retention soil? Too much moisture is generally the reason for fungus gnats. Food grade diatomaceous earth on the top soil layer will usually nuke them.
Also looks like your growing in miracle grow? These little capsules are filled with slow release fertilizer, as you water they soften up and release into the soil, this could be a problem.
@Dave101 is right. U need to dry the soil out. What I have done is spray some diluted neem on the soil. I never spray in leaves, unless I have to and the plant is mature at least.
Also, that is slow release soil. Take it from me, you have to find an opportunity to do some pre flushing with those beads in there, preferable before late stages of flower. And be careful adding extra nutes, as nutes already bleed out from your soil mix everytime you water, u may burn the plant with extra feeds.
What I have learned is most mg soils are ok for autos especially in early stages. But there is too much nitrogen in them for the flowering stage, so you have to do a flush when it starts flowering and another few flushes at the end of the plants life… Which may be an issue if you are already over watering, yikes homi!
And hopefully you used a three month slow release rather then the 6 month soils… Which I have done. I’m not an expert at growing, just an expert at making mistakes and trying not to repeat them
Word up, the organic miracle grow is usually only 2 or three month feed. U are good, mg isn’t that bad, just careful when u add nutes. Lower the recommended dosage and number of feeds to the plant as it already has a slow release feed in it.