um if the shifter cable is not adjusted 100% then when you put the shift lever into the detent for P or R the shift arm on the transmission may not be in the correct spot. Again this points to the shift cable being out of adjustement
if the truck jumps out of park even after you are 100% sure the trans shift arm is reaching the park position then you have bigger issues, but since you said its both P and R my $$$ is on the cable and its adjustment, believe me I deal with this all the time doing transmission conversions and setting up the shift linkage, it must be adjusted 100%