I have unfortunately heard the racist argument and I live in a place that relies on migrant workers. Our main employers rely on Portuguese/Polish/East Timorese/Latvian yet people reference Foreigners.I think it had some part to play in it, as did the promises made by the leave campaigners:
'EU trade easiest in history'
'no downside, only considerable upside'
'Post Brexit a UK-German deal would include free access for their cars and industrial goods'
A policy of Austerity and managed decline in regions across the UK and right wing media stoking division and resentment.
Those Foreigners are funding our pensions.