Custom shader not displaying in the scene.

I made a tessellated geometry shader that offsets vertex by the height map in vertex / fragment shader.

This is the shader I am using.

        Tags{ "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline"}
        LOD 100

            Tags{"LightMode" = "DepthNormals"}


All I want to do is make the shader write to the camera depth buffer and the depth buffer is working but the gameObject that I applied this shader to disappears. If I remove the “LightMode” = “DepthNormals” the gameObject appears but the depth buffer is gone.

Does any one know what the problem could be?

After fiddling with the code I might figured it work. I just copied the entire pass block and pasted in the same subShader. In that block I removed the tag with “LightMode” = “DepthNormals” , it works! but Is this the right way to solve this problem?