How to loop an animated mask?
This expression is not supported for Mask Path Property, because it's a User Defined Property, see the note of the error message. 

Workaround



Mask Path animation once


Precompose your layer an with the animated mask (one time) by Selecting the Layer > Right Click > Precompose (and move all attributes in the new composition)
Enable Time Remapping on your new created composition (Right Click on the composition > Time > Time Remapping), this extends the length of the layer to infinity
Add loopOut(type="cycle") expression to the Time Remapping Property by holding Alt and clicking the stop watch left beside the properties name




Time Remapping enabled on the new composition and expresssion applied

Example



Example using 3 keyframes (third is same as first) and using loopOut() only