I'll "third" that advice. Toothpaste.
When they make a scuba mask, manufacturers pour silicone into a mold that's covered in a "releasing agent." Think of it as "Vaseline" or something similar. It's all over the mold, and helps to release the silicone skirt from the mold after it cools.
Well, invariably, some of that releasing agent gets on the lenses. It's clear, so it's not noticed.
For fog to form inside your mask, a rough surface must exist... The water vapor must have something to condense on. Body oils, any sort of "goo," and even the releasing agent can act as a "nucleus" for which the vapor can condense upon.
Many "anti-fog" agents are simply a kind of "soap" which is designed to keep the glass ultra-clean, and therefore not allow a "nucleus" on which the water vapor can condense, causing the fogging. Other anti-fogs (including spit) work by "coating" the glass so that the water vapor never comes in contact with the nucleus. Of course, this will work only to a degee... If there's enough "goo" on the glass, you're probably going to get some fogging anyway.
So... The best I can recommend is to remove the nucleus... Then coat the glass too. This should combat the problem nicely.
Some have used dishwashing soap to clean the glass really well, but that can leave a residue which is irritating to the eyes. Alcohol can work well, too, but may harm the silicone of the mask skirt. My personal favorite is toothpaste. Put a little dab of it on all of the interior glass surfaces of your mask, add a little water, and use your finger to rub it into the glass and get everything nice-n-clean. Rinse well... Even toothpaste can be irritating to the eyes.
Next time you go diving, spit should work just fine. It's free and plentiful, too, and you never forget it and leave it in the dive bag.
There's also the side benefit of having your mask fresh-n-minty!