Buffer Visualization - Custom Depth not working

In Project Settings, go to the Rendering section, under Post Processing change the Custom Depth-Stencil Pass to “Enable with Stencil”.