There are a couple of ways to look at this.
1 People from Country A migrated willingly as individuals to Country B
2 People from Country A were planted in Country B by by Country A when it ran a Soviet Union, and they never left Country B. They either stayed back as the basis for an insurgency, to spur unrest, or perhaps they liked it better there.
Insurgents and those seeking to disrupt deserve the treatment they get. Any of the others from Country A in Country B who aren't welcomed by their new host need to leave and write it off as a bad idea. There's no shortage of stories about foreign refugees being told prior to hostilities to leave - some people are smart about it and leave ... some aren't. N Vietnam staged a lot of insurgents, spies, and other disruptors in S Vietnam; and they were effective in the war. It's simple. Regardless of how someone came to live in a country hostile now hostile to them, they need to leave. That can be US citizens in Mexico or Russians in Ukraine.