https://www.gov.uk/apply-citizenship-indefinite-leave-to-remain
Time you’ve spent outside the UK
You should not have:
spent more than 450 days outside the UK during the 5 years before your application
spent more than 90 days outside the UK in the last 12 months
broken any UK immigration laws (for example living illegally in the UK)
You may have lost your indefinite leave to remain or enter if you’ve been away from the UK for:
more than 2 years at any time since you got it (you’ll need to apply for a Returning Resident visa)
more than 5 years if you have settled status
more than 4 years if you are a Swiss citizen, or the family member of a Swiss citizen, and you have settled status