unreal camera different view in blueprint and viewport issue

I have programmed camera component in c++ and when I am changing its position in blueprint its working fine. But when I dragging my character in viewport camera position changes on its own. can anyone suggest me how to keep same position as it is in my character blueprint.