Yes - gwaith (time, occasion) is feminine, so we must use the feminine form of four pedair with it
Here, pedair gwaith is an adverb of time, so it gets a soft mutation.
Why does "gwaith" drop the G in "unwaith" and "dwy waith" but not in "pedair gwaith"?
As in the previous post, gwaith with this meaning is feminine (gwaith 'work' is masculine).
un causes soft mutation of feminine nouns, and both dau/dwy cause soft mutation in all nouns.
pedair, the feminine form of pedwar, causes no mutation.