https://www.uscis.gov/green-card/after-green-card-granted/international-travel-permanent-resident
A general guide used is whether you have been absent from the United States for more than a year. Abandonment may be found to occur in trips of less than a year where it is believed you did not intend to make the United States your permanent residence.