A note that it's easy to "overstay" a visa when waiting for a green card interview - the wait times are often in the 6-16 month range, and if you leave the country you'll be considered to have abandoned your "petition to adjust status". It's a catch-22, and it looks like the only recourse is for an immigration lawyer to file a habeas corpus petition in federal court.
This happened to someone I know. He was working on a TN visa, had his green card approved, and was waiting for an interview. He was not allowed to leave the country, but he lost his job, and had to leave the country because of the 60 days grace period of the visa. Because he left, he lost his green card application. You both: 1. Can't leave the country because of immigration laws. 2. Have to leave the country because…
There is a law saying that if you leave the country you abandon your green card application.
Combined with losing his visa and having to leave the country, this just means that the law says if you lose your visa, you lose your green card application too.
But you can always legally leave the country forever.