Expat and Immigrant are defined by their context and do not mean the same thing - they are two sides of the same coin. People are both Expats and Immigrants at the same time, the terms apply equally to immigrants irrespective of their race and ethnicity, where they now live, and where they originated.
The term Expat has an 'origin' context: Expats are people who have left their origin country and settled themselves abroad - they have emigrated / expatriated. Expat is a descriptor that differentiates people of the same nationality who have lived abroad from those who have not; so typically, you would be described as an expat amongst other people from your origin country, or sometimes within a more generalized group of immigrants. When looking for information online, you might use the term 'US Expat' to connect with other Americans who have moved abroad, whereas 'US Immigrant' would connect you with people from elsewhere coming to the US. In this case, it's not where you're going that matters, it's where you're from.
The term Immigrant has a 'destination' context: Immigrants are people who are coming to a country they did not originate from (and are not citizens of) - they are immigrating. Immigrant is a descriptor that differentiates people who are citizens of a country from people who are coming to live in that country from abroad; so typically, you would be described as an immigrant amongst the citizens of a country to which you have emigrated. Immigrant is also an official status as opposed to expat which is purely social. When looking for information online, you might use the term 'UK Immigrant' or 'UK immigration' to connect with other people who have moved to the UK, whereas 'UK Expat' would connect you with UK citizens living outside of the UK. In this case, your origin nationality isn't what matters - it's where you're going.
In my online profiles I often refer to myself as both a former US Expat (to indicate that I once lived abroad but no longer do) and former UK immigrant (to indicate that I once lived in the UK). Even though I am now a UK Citizen and 'technically' no longer an immigrant for entry purposes, I'll always retain my immigrant persona and share the immigrant experience with other people who have emigrated to other countries, especially to the UK and regardless of their origin nationality.
My dual-national daughter on the other hand, who was born in the US and has never lived in the UK, will never be a UK immigrant. That said, if we moved back to the UK she would absolutely share aspects of my immigrant experience in that she would be living in a country she had not lived in before, though she would never technically be an UK immigrant. However, she would still be a US Expat despite her dual citizenship.
It really is all about context. The two terms are equal. Every immigrant is an expat somewhere; and most expats are or have been an immigrant too. Unfortunately, both terms have been severely misunderstood and misused, now carrying loaded innuendo about social status. Amongst white westerners, the term 'immigrant' became synonymous with 'poor black / brown people' and they co-opted 'expat' to purge any negative connotations from their identities. There is nothing inherently wrong with using or identifying with either or both terms, so long as emigrated westerners (especially white westerners) begin to understand that their identities as 'expats' comes packed with privilege and elevated social status; and that they are equally immigrants - it's not either / or. We can help recover the genuine meaning of these words and dispel negative connotations just by learning and sharing amongst our expat and immigrant communities, and by helping non-expats and non-immigrants understand what the terms really mean.
The same is true for the terms migrant and refugee, which are very specific. Migrant is defined as someone who moves for work, typically understood as work that is seasonal or otherwise necessitates a frequent change of residence. Migrating is the act of always being on the move. Frequently, migrants live temporarily in another country, are domiciled elsewhere, and their families stay 'at home' while they are working. In some cases, migrants may be or become immigrants. The experience of a migrant is wholly unique and it is incredibly unjust for western immigrants who move for education, family, and non-seasonal work to call themselves "migrants", just as they should not call themselves (and legally cannot be defined as) "refugees". Terms like migrant, immigrant, refugee, and expat are simply not interchangeable.
In the same way that many people reject the 'I don't see color' and 'all lives matter' arguments to racism, we need to reject the idea that labels don't apply to us as expats and immigrants. I personally think it's important to know that these labels come highly loaded by society and that they are applied to us irrespective of the desire not to be defined by them. The sooner we come to terms with the idea that we aren't just 'living abroad' and that we are made up of and share our mutually exclusive immigrant and expat experiences, the sooner we can articulate those experiences to others, and hopefully begin to right some of the wrongs that have occurred over the course of history.