Hexacopter redundancy Rotation in the yaw direction

If you stop one motor on a hexacopter and fly it, it rotates in yaw.

What should I do to stop this yaw rotation?

You can use hex safe frame or whatever it is called, then you will have 67% chances of avoiding spinning, I am not sure if spin in the other 33% cases is worse then.
Or you need to upgrade to 8 motors as then you will have enough control margin to avoid spinning in a case of losing one motor.

Automatic modes like guided and RTH should work relatively fine during such spin though reposition during land might be harder.

How can I stop the rotation in the yaw direction?

You can’t without making either of the changes I mentioned as otherwise the copter can’t have enough control authority to prevent spin.

A video that does not rotate even with a hexacopter is uploaded