"Expat" is the word that people from Angloamerican countries living abroad call themselves to avoid acknowledging that they are immigrants. They made it into a dirty word in their own countries, railing against immigrants incessantly in their domestic politics. Surely, when they move to another country, they just cant be a lowly immigrant now - they are an 'expat' instead. And they invent a legion of 'reasons' why they aren't an immigrant like everyone else: "Being there temporarily", "Having moved there for a career", and other gobbledygook.
Interestingly, no Nigerian engineer, Chinese researcher, or Indian MBA gets called an 'expat' while living and working in London temporarily. They are 'immigrants' in public discourse and the media. But when Anglo-Americans move abroad, they never become immigrants! It's magic! Even if they are never anything but immigrants in both the eyes of the law in that country and its locals.
'Expat' is just a word invented to protect the fragile ego of Angloamerican immigrants, invented by themselves to boot. Otherwise, in the English language, there isnt a difference between those two words as far as the Cambridge dictionary is concerned.
https://www.oxfordlearnersdictionaries.com/definition/english/expatriate_1