Grow Boxes and a fungus problem

These grow boxes hold 4 gallons of water under the soil for the plants. I am having a fungus problem that I would think could only be coming from the water being some what stagnating under the soil. As it just waiting to be sucked up to feed the plants. Is there something I can put in the water to keep fungus from starting in the water holding part of the grow box without it being a problem to the plants?
Keep growing

Hydroguard and keep those fans running

That must be a huge box to hold 4 gals. I grow in 10 gal earth boxes and at most would dump a gallon in while they were stretching/stacking and probably half of that or less all other times. Also, I let the bottom go completely dry before adding more water. After stretch I might wait 2-3 days dry on the bottom before adding more. There has to be a dry period or it will go anaerobic and stay that way and lock your plants out. Earthboxes are hella easy but you can’t keep them full of water or the whole box of soil we be water logged. During finishing I will take the mulch cover off to let the box start drying a little and just top water it once a week.