The biggest issue with surgical masks is most of the nose strips are pathetically thin so they bend out of place and stop you from getting a good seal, which means they're a nightmare for glasses wearers.
More importantly, it greatly reduces their effectiveness. Fogging up glasses is, by far, the lesser issue of the two.