This is a squash and stretch issue. You can stretch most parts of the Rigify rig and that will work fine in Blender. However, when you export such a movement to a game engine you get the problems you get. The problem is in the bone hierarchy. I tried to explain the problem in this video.
If you find it interesting, I have a bunch of other videos around blender & game engines and we also made an addon that offers solutions to this problem.