During the pandemic, almost every patient I saw who wore glasses complained of fogging of their lenses while wearing a mask. Lenses fog when tiny droplets condense on the surface of the lens. The tiny droplets come from the warm damp breath hitting the cold lens surface. So, you can fix fogging of the lens by preventing the droplets from landing on its surface.
The first way is to block the wet breath from getting near the lens. Make sure the mask is fitting tight over the bridge of the nose and seal the openings at the tops o f the mask. Tighten the mask so that no air escapes from the top or sides. Place the glasses on top of the mask so that if any air does come out of the top of the mask it will blow into the space behind the glasses and travel escape to the air above.
The other way to prevent the droplets from landing on the lens is to coat the lens with something that the droplets can’t easily stick to. Washing the lenses with soap and water and then letting it air dry leaves a thin coating on the lens. Also,rubbing shaving cream on the lens then rinsing it and letting it air dry will also leave a coating. There are also anti fog sprays that can be used as well that create a coating on the lens.
None of these techniques work perfectly and must be repeated often but when combined, they can be effective. Don’t give up. Keep trying until you find what works for you.