if you must wear a scarf at work, you can always quit your job and find another one where you're allowed to wear a scarf.
but, i'm not given a way out with a mask law - and that's the difference, and why one thing is clearly an infringement of personal liberty, and the other really isn't at all.