Racism and nationalism are a fucking atavism.
Nationalism is a core element of liberalism. As long as there’s liberal elections, national borders, other states to compete with and try to outsmart/bludgeon into submission - libs will support “their” nation against others, and against what they see as being damaging to it. By force if they see it necessary.