When a player gets pushed into a solid block by a piston, the player gets teleported to the block above. This appears to be happening with both regular pistons and sticky pistons. The glitch also works if there is one or up to 12 blocks in front of the piston.
The glitch doesn't work if there isn't enough space for the player to get teleported into. For example, if there is a block placed above the solid block the piston is trying to push the player into. The player will instead just get pushed to the side or to an open space.
I have tested this glitch in both realms and in vanilla 1.14.1 singleplayer and it seems to work in both if them.
I also included some pictures to be seen below:
Duplicate of MC-125926 - please search in the future