Patriotism is a Negative Human Bias

Patriotism is the action of vigorously supporting the nation one belongs to. There is nothing wrong with believing that the nation one resides in is better then another, however, one would need to begin to define what 'better' means. In my argument 'better' is equivalent to pushing mankind forward in medicine and scientific achievement, then would it be an acceptable statement that a nation that achieves this result with a greater degree then another is 'better'? Is it wrong to be proud of that achievement, and stating to foreigner that the achievements his country made are greater then the foreigners? Or maybe it is the level of safety citizens of a nation can feel that determines its 'better' status, the large majority of immigrants leave their respective homelands in search of more secure locations. Disregarding the dilemma and conundrum, would you say that Syria in its current state is 'better' place to live then Australia? Patriotism and xenophobia do not coincide together, because if every single human being on the planet was patriotic, nobody would want to leave the country they were born in. Under your scenario of 'patriotism escalating', which i believe hypothetically labeling every single person patriotic would be the peak of such escalation, would closed borders, small global community and even smaller global trade market become a reality? Of course not, it is not how markets nor global economy works, as an example of natural resources would country produces oil another has arable land to harvest wheat. They would trade the wheat and oil at a market determined ratio, neither can live without the others goods. Where does xenophobia and the ones that are gripped by it come from? Do you believe any individual would hate a race or religion if their experience of that sect of peoples would be beneficial to them or the community? Take for example a the experience of an individual that every time encounters a foreigner receives money, would one assume this person to be xenophobic after his experiences? Or the polar opposite argument of an individual that always has trouble caused by foreigners, both would have completely different feelings towards immigration. If this situation is a one off, it can be disregarded, however, if one class of people have the same feelings and another totally different, maybe its because there are reasons for it. Look at Brexit for example, predominately the upper classes voted to remain, and bashed the lower class for being xenophobic and racist, but they never considered that the type of immigrant they encountered from a foreign land walking the halls of Oxford University was completely different from the common man that the lower classes dealt with. How could any individual be xenophobic if every time they crossed paths with a foreigner that person gave them money or bettered their life? The truth of the matter behind xenophobia and patriotism is that the amount of energy required to create stable countries and communities is immense, and importing people that do not have the same goals aligned as the citizens will create friction and collapse. Where do you live? In the West? Where would you rather go? Albania? Turkey? China? Venezuela? What nation can you apply to be a refugee to if things turned sour?