From here:

What if a large volume (a rectangular prism for instance) was placed outside of every wall/floor/ceiling that would push players back into the field via motion. This would be similar to the effect where you try to push your head through a wall but with a larger collision box. Then if the player's head is colliding with this volume, speed them back into the field.

These can also be placed inside rocks and other environmental decorations to force players out of them.

For those who have walking off, they can just be teleported back in instantly instead of sliding back to prevent motion sickness (even though they are cheating we want to be nice).

Animated gif example: