A green card is the common name for permanent resident status. It will allow you to live and work in the U.S. indefinitely in most cases.
The problem is, for the authorities to treat you as a permanent resident, they need to view you as a permanent resident. That can limit your freedom to travel out of the country.
The authorities will review your right to enter every time you return to the U.S. Hence they could refuse you entry whether you hold a green card or not. Global events can sometimes influence how the U.S. views people of certain nationalities. A criminal conviction, whether in the U.S. or overseas, could also harm your case.
Living and paying tax in the U.S. demonstrates you are a permanent resident
If you leave for too long, the authorities may consider you are no longer a resident and take away your green card. If they discover you are paying tax overseas instead of in the U.S., they may do the same.
Does that mean you can never leave on a green card?
You can, but you need to watch how long you are away. It is easy to stay away longer than you think. For example, you leave to visit your mom, and the doctor diagnoses her with a terminal illness while you are there. You decide to spend her last weeks by her side. Months later, she is still fighting away, but you are afraid you’ll never see her again if you go back to the U.S. However, if you do not go back soon, you may lose your right to.
How long you can stay out of the country or for what reasons is not clear-cut. If you think you will be overseas for more than a couple of weeks, seek legal help to examine options to protect your permanent residency.