How to use stencil buffer with the foliage on UE5

how to use stencil buffer with the foliage on UE5?

is it passable to do that?
because I couldn’t find any values setting it up on Derails tab material editor and mesh.

I found below image but it’s been disabled like image below.