If you have filed 485, after you get your EAD, all the rest is just like an
H1B with 485 pending. With an EAD, you are allowed to work and stay in USA
until USCIS's final decision on your green card. If you lose your job and
your 485 is withdrawn by the company or is denied by USCIS in the end, the
game is over and you have to leave the country, so the important thing for
your 485 is keeping your job.