Hi.One of the criteria for maintaining your non-residence status is that you work a "sufficient number of hours overseas in the tax year". Another one is that you don't have a "significant break" from work. This is defined as a period of 31 or more continuous days from work. See paragraph 3.20 on page 40 of RDR3 here. In any event, you should try to keep your days in the UK under 91 though you may be allowed a little extra depending on the number of ties you have to the UK. The notes here may also be of interest.I hope this helps but let me know if you have any further questions.
My apologies. I posted the same link twice. The second set of notes is here.
Read from paragraph 1.10 on page 10 of RDR3 here for information on how to calculate the number of hours you have worked.