such as: did you your i-140 or approved? based on lc or niw? did you your i-485?
general answer: if you had already ted i-140 based on lc, you will lose your pd after you changed job. you need do anything again.
if it is niw, you could change any time.
if you had already ted i-485 and it has already over 180days, you could keep your case.
if your i-140 approved, but you didn't i-485, you might keep your pd, but you need do anything again from beginning. but if your previous company withdraw your i-140, you will lose your previous pd also.