Ninja Character - Dynamic gravity for characters & objects

I reviewed all possible settings in all components. The only thing I could do to fix the situation was to add an automatic change of the controller angle if it does not match the angle of the capsule of the character. But unfortunately this caused another problem, when you try to direct the camera to the original top or bottom, it starts to rotate in a random direction.