Countries can make any laws they like; that doesn’t mean they’re right or good.
They’re not going to stop drug or ‘rainbow’ cultures from getting into their country by inhibiiting hairstyles, for goodness’ sake. And they’re going to cause a whole lot of trouble to innocent people with this. The poorest old peasant there could tell them these things.
Next, they’ll have ‘State Approved’ hairstyles, like North Korea:
https://newsfeed.time.com/2013/02/25/these-are-north-koreas-28-state-approved-hairstyles/
You would be surprised at what can be stopped by smacking the person who tried to take your dinner roll.
Will this work? Maybe.
But since mohammedans are cool with the idea that you can make a man into a women by chopping off body parts, probably not.