https://www.theverge.com/21301830/face-mask-glasses-fogging-how-to-stop-clear
Also, shaving cream can be used to stop the bathroom mirror from fogging up: rub some on, and keep buffing it with a dry cloth until it goes away.
That would probably work for glasses too.