Problem with the rotation pitch

Hello,I’m trying to make an third person shoter,like The Division 2.The Focus input is for the second camera that is much closer to the character.Only in focus mode the player can rotate the character for shooting.When i move on the Y axis (in focus mode) and i released it the charcter remain in the same position.I don’t know how to make it come to the same position(Y=0).