Skilled worker visa - unpaid leave

I am a transwoman working in UK under a skilled worker visa valid for 3 years. I am scheduled to have a gender-affirming surgery in Thailand this March which would require me to be there for 2 months to recover.

I have no more sick leave and annual leave credits to cover the 2-month period. Am i allowed to file unpaid leave because of the surgery. Because I read on gov.uk website that if you are under a skilled worker visa, you are not allowed to take unpaid leave of more than 4 weeks, otherwise, your employer would need to cancel their visa sponsorship.

Am i allowed to file the unpaid leave? If not, what else should i do?

Thank you.