Welcome to CF!
You can try taking it out of park and then shift it back more forcefully making sure it is fully into park. If that does not work then the shifter need to be replaced, or a 'fix' can be applied as per the video below which is for a Malibu but I think it would be near the same for the XTS.