Look at the balance of harms in this example. On the one side, a TSA employee whose expression of sincere opinion is restrained by his employer, the government. On the other side, millions of innocent people who feel dissuaded from air travel on the grounds of national origin (see below) because they don't believe they'll be properly treated at airports and because they fear assaults , even if only verbal, from passengers emboldened by the slight imprimateur of official support for their prejudice.
(I say national origin rather than religion because most people seem to be in the habit of making judgments based on the former. Post 9/11 people like Sikhs were attacked because they were foreign-seeming and from a part of the world that has a lot of Muslims, even though Sikhism is a wholly different religion. a woman named Fatima Mubarak might be a Christian but most people are going to assume Islamic affiliation based on her name. Likewise, it's easy to imagine or identify people who are Islamic but statistically unlikely to be identified as such. In the aggregate, we're pretty superficial).
You have a balance of harms here, and I think ultimately courts would choose the harm that affects the fewest number of people, especially given the existence of numerous avenues for dissatisfied TSA employees to raise grievances through administrative channels rather than by trying to whip up public sentiment in favor of their political view.
Please note that it's not the speech excoriating someone else that I'm saying should be regulated - it's the publicity by the angry person of their official position with a government agency in connection with that speech, which shI say should be restrainable by the agency. If the TSA agent in this example thinks the agency so wrong-headed, s/he could resign from the TSA and then write things like 'I quit the TSA because they don't recognize the threat posed by Muslims' - to which the TSA could reply 'We are required by law to treat everyone equally and it is our policy to do so, which is why we parted ways with this employee.'
Now I totally agree that it's convenient when 'assholes out themselves as such.' The thing is that when they're in uniform (so to speak) what's convenient to you or me may be intimidating to someone else; things look quite different when you're a spectator rather than the target of someone's bias, and the appearance of official sanction for that bias amplifies the intimidatory effect. I'm saying that the interests of the agency in being seen to serve the public fairly and in accordance with law outweigh the interests of the individual agency employee who feels constrained by the agency's code of conduct.