When using Cinemachine, my camera’s z-axis continues to move in the negative direction. I am using it in Unity2D trying to create a blend between VCams when entering a new room. I have attached a video below that shows off my issue.
Your Virtual Camera (vcam) should not follow the Main Camera. It should follow the Player.
When you are using Cinemachine, you can’t control the Main Camera using its Transform. Instead, you control the Main Camera using vcams. In your case, CM_0, CM_1 are your vcams.
The reason, why the Z value decreases, is that the vcam (CM_0) is following the Main Camera. Every frame, the vcam moves the Main Camera so it is 10 units behind the Main Camera.
I noticed that you are using CinemachineConfiner - Confine Mode: 2D. This is fine, if your rooms are rectangular. You can try using our new CinemachineConfiner2D extension. This will be faster at run time. In case, you’d like to use more complex shapes, then CinemachineConfiner will not be as reliable as CinemachineConfiner2D.