There are standards for the amount of force the mask must withstand and punch test devices like these [1] to exert them repeatably. Officials punch a few times across the front and the sides, look for failure or severe deformation, and the mask passes for the event.
[1] https://radicalfencing.com/products/rf-pbt-mask-punch-tester