Does anyone know how long you can be out of the UK without affecting your tax status?

Hi all,

Looking to live outside the UK but still want my tax residency to be the UK, I have a Ltd in the UK which I run things through.

Some places I see no more than 6 months of a given year and some places I see 5 years