yup. hell a quick google search brings up plenty of explanations for this phenomena but anyone who has worked on cars with wheels off the ground should know this basic function of differentials.
https://www.quora.com/Why-might-wheels-turn-when-the-car-is-in-P-park#:~:text=Due to the way the,also be able to turn.
The transmission does “lock” the drive axle, yes. However it only locks the axle and since there is a differential, even when locked, the wheels will spin freely in opposite directions. For example, if you place the car in park on an incline and one wheel is on ice, and the other is on pavement, the car could still move. The tire on the pavement would roll downhill will the tire on the ice would spin uphill. This is in contrast to using your parking brake where each wheel is “locked” and will not spin (could still skid) but not spin.