alpha won't change when built to iOS but works in inspector,alpha doesn't change when built to iOS but works in inspector

Script works fine in the inspector, but when it gets built to iOS, the alpha doesn’t change if the material is initially set as Opaque. All standard shaders in the default render pipeline.

This script is meant to take an object that has more than one material on it and make the GameObject transparent when the slider is used. To ensure that the materials render properly when the alpha is at 1f, I am using a shader utility script to switch the material’s render type to Opaque and switch it to Transparent so that they can fade out.

I want the materials to start as Opaque and only be made Transparent if the slider is used. This is where the script works fine in the inspector, but as soon as I build, the materials won’t change their alpha. I know the script changes them to Transparent, because they render improperly. If I make the materials start off as Transparent, the alpha changes correctly but they again render improperly until I move the slider down then put it back to 1f. So I need the materials to always start as Opaque and only change when the slider gets used.

Why would it suddenly not work when I build to iOS but work in the inspector? Unity 2019.4.3f, AR Foundation 2.1.8, Xcode 12.3, iOS 14.3

{

    public GameObject currentGameObject;
    public Slider slider;

    private float alpha = 1f;
    public float Alpha
    {
        get => alpha;
        set
        {
            if (alpha != value)
            {
                alpha = value;
                ToggleBlendMode();
                ChangeAlpha();
            }
        }
    }
    private Renderer[] mRenderers;
    private List<Material> mMaterials = new List<Material>();

    void Start()
    {
        // assuming that renderers will be present on currentGameObject at Start and will never change 
        mRenderers = currentGameObject.GetComponentsInChildren<Renderer>();
        foreach (var rend in mRenderers)
        {
            mMaterials.AddRange(rend.materials);
        }
        
        // if slider is present
        if (slider)
        {
            Alpha = slider.value;
            slider.onValueChanged.AddListener((arg) => Alpha = arg);
        }
    }

    void ToggleBlendMode()
    {
        foreach (var mat in mMaterials)
        {
            if (Alpha == 1f)
            {
                //set BlendMode from StandardShaderUtils to Opaque
                StandardShaderUtils.ChangeRenderMode(mat, StandardShaderUtils.BlendMode.Opaque);
            }
            else if (Alpha < 1f)
            {
                //set Blendmode to Transparent
                StandardShaderUtils.ChangeRenderMode(mat, StandardShaderUtils.BlendMode.Transparent);
            }
        }
    }

    void ChangeAlpha()
    {
        foreach(var mat in mMaterials)
        {
            Color oldColor = mat.color;
            Color newColor = new Color(oldColor.r, oldColor.g, oldColor.b, Alpha);
            mat.SetColor("_Color", newColor);
        }
    }
}

Found a solution, just use a better transparent shader like the one here, Unity - Manual: ShaderLab: commands