if you have filed I-485, pending for 180 days, that is the best time for you
to change job and not affecting anything. The AC21 law protect you for
job portability specifically from "180 days since I-485 pending to the date
of I-485 approval". change job before 180 days or after I-485 approval, you
will have no law protect you but need to prove your intent. USCIS officer
will interpret your intent.