Height-Restricted Procedural foliage along the z axis

I have a procedural foliage blueprint controlled by a material instance, and although grass and trees are spawned as intended only where there is a relatively flat surface, how can I ensure that neither grass nor trees spawn below a certain customizable depth along the z axis even if the surface is flat?

Currently, the grass placement is determined by weight according to a weight-based layer in the landscape paint settings. The trees are placed anywhere there is grass according to a grass function and foliage blueprint / grass type.