I've known people who left for a brief period during the GC process on emergency basis and then were put into a literal jail on their return to the USA.
If you end up in “jail” for leaving the country on a green card then clearly you made a mistake.
The process is very straightforward - without advanced parole or a valid visa you can’t come back in.
Or if you’ve violated immigration or criminal law you run the risk of being detained.
But that’s how the system is supposed to work.
>> put into a literal jail on their return to the USA.
You'd be lucky today if that literal jail was IN the USA.