Reversed Occlusion Stencil Shader with depth?

Hello devs, I am trying to solve an issue that I haven’t really seen explicitly covered any where yet and hoping to find some guidance.

I’m trying to figure out the best way to handle occluding objects wherein the “wall” ( as seen by the box in the below image) is invisible, but still hides what is behind it.

My issue is that, as I have discovered, the stencil shader that I’m using to do this is strictly 2D and has no awareness of 3D space, therefore the cylinder which is actually in front of the wall is being occluded by the shader when it actually shouldn’t.

Is there an approach that might help me solve this problem?

I’m not married to the idea that this has to be a stencil shader, this was just the closest approach that worked perfectly, until I moved the objects in front of the wall.

Thanks in advance.

Solved.

Apply this shader to the invisible wall, and then whatever shader you want to everything else

Shader "Custom/DepthOcclusion" {
Properties    {    }
    SubShader
    {
        Tags { "RenderType" = "Opaque" "Queue"="Geometry-1" }
        LOD 100

        Blend Zero One

        Pass {  }
    }
}