How to fix ragdoll from clipping partly into the floor?

I have a reoccurring problem with my ragdolls and that is that a hand or foot clips through the floor and he gets stuck.

This is a recreation in the Content Examples project with Epic’s preset ragdoll:

It usually happens when you slam a ragdoll into a floor or wall, and then it starts spazzing all over the place.
How do I fix this?