What you're mentioning is a regular adjudication process when USCIS has jurisdiction over the case.
However, the more "advanced stuff" involves immigration courts.
An immigration judge sometimes can grant LPR status, for example if OP was in removal and court had jurisdiction.
However, sometimes judge only terminates proceedings and doesn't grant the status. In that case the I-485 should be transferred / refiled to USCIS.
I'm not a lawyer, so please pardon my vague explanation. What I'm saying, sometimes USCIS has jurisdiction over the case, and sometimes it's the court. If somebody's case is pending at the wrong place, they usually won't touch it and person is stuck in limbo.
See more here: https://www.uscis.gov/laws-and-policy/other-resources/immigration-benefits-in-eoir-removal-proceedings
Maybe somebody more experienced can explain.