Your green card process is separate than your current job. It basically is attached to the future job that your employer has promised to offer you, as and when, the green card is available.
So, even if you leave the country or your current job, as long as your current employer is ready to offer your the same job in future i.e. at the time your priority date is current, you can file for I-485.
As a matter of fact, you can even use this current I-140 to port your priority date with any other employer in future.