Having lived most of my life outside the country of my birth I often have thoughts about this. For many people, group identity is a matter of importance. Here in Israel/Palestine I have seen many newcomers go to great lengths to integrate into one or the other society. Some people also seem to see a deficiency in their original identity, and try to adopt a new identity even without really needing to on a practical level. For example, they have converted to Judaism, taken on something of the national ethos, but then gone back to their own countries. Or they have taken up the Palestinian cause, and sometimes converted to Islam, and continued in this while living elsewhere.
Different types of newcomers:
There are some immigrants who spend long years painstakingly adopting and perfecting a new national, linguistic, tribal or religious identity (these sometimes go together).
There are some who are natural chamelions and quickly adjust; without necessarily taking any new group identity to heart. They would just as easily adapt to living in a third country.
There are some who live in a new country but staunchly resist its influence, asserting their foreigness and maintaining their love for their former country (sometimes without realizing that they have been subtly changed by their adopted country, and probably would not be able to live again easily "back home". I think this has been true of my parents.
There are some who live a double life - pretending to "belong" when they are dealing with citizens of the new country, but privately living and keeping up the attitudes and prejudices of the former country.
There are some for whom group identities are unimportant. They take the trouble to understand the outlook of people in their adopted country: their red lines, hangups, prejudices, and the things that make them happy, proud, or provoke favourable responses. But they don't go out of their way to change themselves. They don't feel a need to take on a new identity package because of this, or feel any need to abandon a former national, linguistic, tribal or religious identity.
I think I am closest to the last category. Group identities or membership in them are not so important to me. I have no doubt gradually accrued certain traits from the places I have lived. This is not so much a conscious process, but happens all the same. There is no particular country where I feel entirely at home, and whereever I go I feel something of a foreigner. But this doesn't really affect me.