Culling mask not working

I have this particle of blood

but for some reason if there is light it look like this

I tried adding a culling mask

public LayerMask affectedLayers;
transform.GetChild(0).GetComponent<Light>().cullingMask = affectedLayers;

but culling mask didn’t work it give the same result
this is the material configs

I’m using a custom HDRP lit shader

this is the light configs

Make sure the affectedLayers has everything checked except the layer you don’t want to illuminate.
Make sure the particle system is on the layer you don’t want to illuminate.

That’s what I did and didn’t work