Instanced shaders / Build Player

I have been having issues with my instanced shaders in the Build Player. But before that - I tried simplifying a stencil shader (discards a fragment if the stencil says so) to use as a tester but it isn’t working at any level? The clip function isn’t not clipping when the texture is correct for it in the inspector. The compiled code doesn’t have all of the properties listed?

As for the main problem I have tried tinkering with stripping, includes, settings etc, hoping id get the gotcha

Shader "Custom/TEST"
{
    Properties
    {
        _MainTex ("Main Texture", 2D) = "white" {}
        _StencilTex ("Stencil Texture", 2D) = "white" {}
        _StencilThreshold ("Stencil Threshold", Float) = 2500
        _StencilOpacity ("Stencil Opacity", Range(0,1)) = 1
    }
    
    SubShader
    {
        Tags {"Queue"="Transparent+100" "RenderType"="Transparent"}

        HLSLINCLUDE
        #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
        #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"



        CBUFFER_START(UnityPerMaterial)
        float4 _MainTex_ST;
        float4 _StencilTex_ST;
        float _StencilThreshold;
        float _StencilOpacity;
        CBUFFER_END

        TEXTURE2D(_MainTex);
        SAMPLER(sampler_MainTex);
        TEXTURE2D(_StencilTex);
        SAMPLER(sampler_StencilTex);

        struct Attributes
        {
            float4 positionOS : POSITION;
            float2 uv : TEXCOORD0;
            float3 normalOS : NORMAL;
            UNITY_VERTEX_INPUT_INSTANCE_ID
        };

        struct Varyings
        {
            float2 uv : TEXCOORD0;
            float4 positionCS : SV_POSITION;
            float3 positionWS : TEXCOORD1;
            float3 normalWS : TEXCOORD2;
            UNITY_VERTEX_INPUT_INSTANCE_ID
        };
        ENDHLSL

        Pass
        {
            Name "TESTForwardLit"
            Tags{"LightMode" = "UniversalForward"}

            ZWrite Off
            ZTest Always
            Cull Back 
            Blend SrcAlpha OneMinusSrcAlpha

            HLSLPROGRAM
            #pragma vertex LitPassVertex
            #pragma fragment LitPassFragment
            #pragma multi_compile _ _MAIN_LIGHT_SHADOWS
            #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
            #pragma multi_compile _ _SHADOWS_SOFT
            #pragma multi_compile_fog
            #pragma target 4.5

            #pragma multi_compile_instancing
            //#pragma instancing_options assumeuniformscaling procedural:ConfigureProcedural
            #pragma multi_compile _ DOTS_INSTANCING_ON

            Varyings LitPassVertex(Attributes input)
            {
                Varyings output = (Varyings)0;
                UNITY_SETUP_INSTANCE_ID(input);
                UNITY_TRANSFER_INSTANCE_ID(input, output);

                VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz);
                VertexNormalInputs normalInput = GetVertexNormalInputs(input.normalOS);

                output.uv = TRANSFORM_TEX(input.uv, _MainTex);
                output.positionCS = vertexInput.positionCS;
                output.positionWS = vertexInput.positionWS;
                output.normalWS = normalInput.normalWS;

                return output;
            }

            half4 LitPassFragment(Varyings input) : SV_Target
            {
                UNITY_SETUP_INSTANCE_ID(input);

                // Get the screen-space position from SV_POSITION
                float2 screenPos = input.positionCS.xy / input.positionCS.w;
                screenPos.y = 1 - screenPos.y;

                // Sample the stencil texture using screen space UV (1:1 overlay)
                float stencilValue = SAMPLE_TEXTURE2D(_StencilTex, sampler_StencilTex, screenPos).a;

                clip(stencilValue - _StencilThreshold);

                // Continue with the rest of the fragment shader
                half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv);

                return col;
            }
            ENDHLSL
        }
    }
}
Constant Buffer "UnityPerMaterial" (40 bytes) on set: 1, binding: 1, used in: Vertex Fragment  {
  Vector4 _MainTex_ST at 0
  Float _StencilThreshold at 32
}