Lock Camera on Z-axis

I have been using the following code to restrain the camera movement on the z-axis.
Previously on Cinemachine 2.3.4 all went fine but today I wanted to upgrade to 2.6.0 due to some bug fixes
But my script no longer has any effect. What is the new recommended way to confine the camera on a specific axis?

using UnityEngine;
using Cinemachine;

/// <summary>
/// An add-on module for Cinemachine Virtual Camera that locks the camera's Z co-ordinate
/// </summary>
[ExecuteInEditMode]
[SaveDuringPlay]
[AddComponentMenu("")] // Hide in menu
public class LockCameraZ : CinemachineExtension
{
    [Tooltip("Lock the camera's Z position to this value")]
    public float m_ZPosition = 10;

    protected override void PostPipelineStageCallback(
        CinemachineVirtualCameraBase vcam,
        CinemachineCore.Stage stage, ref CameraState state, float deltaTime)
    {
        if (stage == CinemachineCore.Stage.Body)
        {
            var pos = state.RawPosition;
            pos.z = m_ZPosition;
            state.RawPosition = pos;
          
        }
    }
}

This is a bug in CM 2.6.0, which has been fixed in 2.6.1 (soon to be released). For now, you can temporarily change if (stage == CinemachineCore.Stage.Body) to if (stage == CinemachineCore.Stage.Noise)