How to avoid double tax if working overseas
Anyone working abroad could be potentially subject to uk income tax both in the UK and overseas. The UK could retain the right to tax the income if you're still a UK resident and the overseas country could be looking to tax the income given that it arises from a local source.
There are two main ways that you can avoid this double tax scenario in the first place.
Firstly you could lose UK residence status. If you leave the UK for a full time contract of employment overseas that last for at least a complete tax year AND your visits satisfy both the 183 requirement and the 90 day average requirement you should be non resident.
The UK then won't look to tax income from an overseas employment.
The alternative is to rely on a Double tax treaty to avoid tax in one of the two countries. Usually such treaties would assist and state something along the lines providing you are in the UK for less than 183 days and there are no UK duties perfomed the salary should be taxed overseas. Each treaty is different though and would need to be reviewed.