The rule for permanent residents who are not Chinese citizens is they lose right of abode if they cease to be "ordinarily resident" in HK AND don't set foot in HK for 36 months.
So it's POSSIBLE to be absent for over 36 months and not lose light of abode, IF you were still "ordinarily resident" for some of that time. THAT is the question that would be determined on a case-by-case basis.
An example would be if you left HK in 2020 for a short visit, FULLY INTENDING TO RETURN SOON, but then got stranded overseas due to Covid. Then after 6 months you decided to abandon your life in HK and build a new life elsewhere — your 36 month "timer" would start at that moment. If you returned to visit HK 33 months later (so 39 months' absence in total), you still in theory would NOT have lost right of abode.
Of course you might struggle to prove exactly when your intent changed, so it's better not to rely on this.