"If you don't like it here, leave." Let's examine this sentence for a moment, since it has caused so much real and faux outrage recently. Is it inherently racist? We'll expose it to a linguistic diagnosis -- like Quincy the medical examiner, only with words.

First, does it assume the speaker has special status or a sense of ownership of "here"? Perhaps, but not necessarily, it could be a neutral observation.

Does the question include an acceptance of or even a preference for the current conditions? Perhaps, but not necessarily, it could be neutral observation.

Does it suggest that the "it" in the "don't like it " speaks to what life and conditions are like in the (here) country at the present? I would say yes.

Is it possible that a neutral observer, watching or experiencing the receiver in a negative reaction to someone or something in their own life circumstances "here," could fairly reach a conclusion in justifying the asking of such a question?  I would say yes.  Example: "Look, I see you freaking out about something, and even while I don't know all there is to know about this place, I can fairly ask, "If YOU are so miserable here, if YOU don't like it here, why don't you leave?"

Do we agree so far?

Now then, where in the sentence "If you don't like it here, leave" does it convey the idea that the person receiving the admonition isn't wanted or doesn't belong?  I would say that on its own merits, it doesn't. In order to reach that conclusion it would take an interpretation or personalization of the words by the receiver or there would need to be an assumed intent behind the words by the receiver because, on their own, the words don't carry that judgment.

There is a lot of tap dancing to be done to in order to be able to jump from a defense of America today to conclude there are the elements for a charge of racism.

An article in the  Patriot Post explains why the default on almost any question of comment or behavior today becomes "racism".

"As President Calvin Coolidge said, “Once we have made this land our home, wherever our place of birth, whatever our race, we are all blended in one common country.” That was the idea of the American melting pot, which Democrats have turned into a boiling cauldron of identity politics and racial animosity. That’s why leftists (and too many on the Right) can’t view President Donald Trump’s comments about four congresswomen in any way except through a racial lens."

The article is well worth reading and I hope you will because it reminds us "an American tradition (for good or ill) is reminding people who don’t want to be here that they can leave at any time. (After all, we need a wall to keep people from illegally coming in, not, as in totalitarian socialist states, one to keep people from getting out.)"