Is that really still the case, though? According to Jaime (admittedly using examples he read about in a comic strip called The New York Times), border officials are denying re-entry to the US even to permanent residents (and canceling their permanent residence) if those permanent residents set foot outside the US without having remained inside its border for two straight years after the granting of permanent residence.

Chapter 3 - Continuous Residence
A. Continuous Residence RequirementAn applicant for naturalization under the general provision
www.uscis.gov
I dunno... who to believe, published federal policy or a YouTuber?