DO NOT TRY THIS AT HOME!!!!
Even with the switch set to 4high or 4low, the transfer case lockup is still handled by the transfer case clutch coil. When you switch off the ignition, the coil loses power, and the transfer case unlocks. So, despite being in PARK, there will be nothing holding the truck in place and it can roll. Even locked in 4high or 4low, when the vehicle is stopped, the clutch goes to a minimum duty cycle. You could probably bypass it by using the brown wire mod to force the case to stay locked, but again, when it eventually runs the battery dead and the coil releases, the truck is free to roll.
Now, you *can* use the parking brake on a temporary basis for troubleshooting, but I would not recommend relying solely on the parking brake to hold the vehicle in place.
That being said, if you've got play in the pinion shaft, do not spend any more time playing with it. Get it to a competent driveline shop and have it rebuilt. The longer you wait, the more expensive the repairs are going to get.