Fungus gnats usually mean the soil is being kept too moist. Place a saucer under the plants and put the water there so the upper soil in the pot dries out more. Combine drier soil with adding some of the yellow sticky traps you can buy at the garden center. They can be cut to smaller sizes if needed. They will catch the flying males to reduce the breeding. A layer of dry sand on the surface will also help. Dish sop isn’t good to spray on plants but insecticidal soap will kill the adults on contact.