As someone whose maternal side of the family goes back to the Anglo-Saxon era and whose paternal side goes back as far as the Norman conquest and who spent a significant part of his life living in the U.K., (left in 2015) - who is "foreign"?
The Celts, Bretons, Romans, Jutes, Angles (Ãngli), Saxons, Frisians, Franks, Danes, Normans, Jews, Huguenots (N.B. all from Europe) all make up England's ancestry. Not to mention the French and Belgian groups arrving in WWI, the various Slavic groups who arrived in WWII, like the Poles and Czechs, then the African, Afro-Carribean, Indian and Asian groups who have arrived since then from the former Imperial colonies. (Maybe don't invade people and make them Imperial subjects...)
A crude tally of English words reveals about 40% are Germanic (Anglo-Saxon) and 60% are French (Norman) in origin. Indeed, at numerous points in history, huge swathes of Brition were parts of various European titles and Kingdoms.
At any level, "Foreign" is a silly concept in Britain and England in particular.
A great point about the work ethic of the first wave of the 2004 eastern-European accession migrants was made at the time, (by a Conservative politician - I'm sorry I forget the name) on the BBC's "Question Time". Within the first year, around 400,000 eastern Europeans had come to the U.K. and of that many, after the eligibility waiting period, about 400 had applied for unemployment, (mostly due to poor language skills, or considered too old to be offered employment) - a 0.1% ratio. As he put it, "That means they walked into jobs that at least 400,000 British citizens simply didn't want to do." (N.B. There were ~1.43 million British in unemployment at the time, at least 400,000 of them happily so.)
Post Brexit vote there were numerous "man in the street" interviews, one of which, when asked (by Sky News I recall) why he voted leave said, "To stop the blacks coming here.", when it was pointed out that the E.U. didn't control the U.K.'s immigration from its former African colonies, he simply walked away. A sterling example of the sheer ignorance most British citizens had (and have) of exactly how their own country functions, let alone within the E.U. Then you meet Brits who moved (usually from the north of England) to places like Australia, who say similar things like "We moved here to get away from all the blacks.". (Odd, considering the north of England is the whitest part of the country.)
A retired family friend is a former mayor of an English city and he told us that both city and Westminster governments loved how ignorant the people were of the E.U. as they (the English governments) could leverage that for revenue-raising. The English tabloids often loved to whine about how "The French/Germans/Italians/whoever, were ignoring E.U. directive XYZ, blah, blah, blah.", conveniently failing to mention E.U. directives were to be implemented in-line with each nation's own legal frameworks and constitutional settlements. Our friend said, "We English simply enacted the most draconian interpretations of theses directives so we could fine anyone for anything and use that to raise revenues without raising taxes. When people complained, UK governments could just shrug and say, "It's the E.U., not out fault.", they (the E.U.) were the perfect scapegoat.
Maybe not all down to racism, I'll grant you that, but a lot of bigotry, ignorance, xenophobia and outright stupidity? Definitely.