Hi,
If you leave the UK, to return to South Africa, but continue to be employed by a UK based employer, while resident outside of the UK, you will need to submit an online P85 form.
Get your Income Tax right if you're leaving the UK (P85)
This will let you notify HMRC that you are leaving the UK and ensure that your employer can operate the correct tax code. As you will be resident in South Africa, you will be liable to pay tax on your UK employment in South Africa, as part of the double taxation treaty under article 14.
UK/South Africa Double Taxation Convention signed 4 July 2002
If you return to the UK and undertake work for this employer while in the UK, that proportion of your earnings will be taxable in the UK. You will also need to review the guidance on tax residency and take the residency tests.
RDR3 Statutory Residence Test
You may find that your visits to the UK in a tax year, when added together, mean that you are tax resident in the UK and your UK employment income will be taxable in the UK.
Thank you.