The appearance of fogging depends on several factors, the difference in temperature between the body and the water, humidity levels, etc.
Wear due to friction is one of the main causes.
If your mask fogs up, dip your lens in the water and a protective film will reform.
After a certain amount of time it is normal for the performance of the anti-fog coating to be diminished.
Anti-fogging reactivators are available on the market.