Both examples involve an imam using a legally authorized method of purification and followers using a different, equally authorized method.
The mere difference in method is not enough to invalidate following. What matters is whether the imam validly fulfilled the ritual-purity condition.