Mmm, the mineralogy class is coming back to me.
Glass has a hardness of 7 on a scale of ten. (A diamond is a ten) Keep in mind it is a logarithmic scale. Sand is mostly silicon dioxide (Glass), so it can scratch glass masks if applied properly, but it is rare. Teeth are made of a mineral called, amazingly enough, Apatite (calcium Phosphate, I recall. I could be wrong on the chemical makeup.). Apatite has a hardness less than glass. From memory, and only memory, I believe it is less than 7 on the hardness scale.
Therefore, abrasives in toothpaste will have a hardness less than that of Apatite (to prevent us brushing our teeth down the drain), which has a hardness less than that of glass.
To make it simple, the abrasives in toothpaste cannot scratch glass. Much like an emerald cannot scratch a sapphire, which in turn cannot scratch a diamond.
If your mask lens is made of glass, toothpaste away! If it is made of plastic, be careful. No telling it the particular plastic that your mask lens is made of is hard enough to resist toothpaste abrasives, as the hardness of any particular plastic in a mask lens is difficult to know.
Again, I hope this helps.
Colin Berry