You have to actually cut out the geometry for the leaves and blades of grass and use opaque materials to reduce Nanite overdraw in foliage. (As described in Epic’s blogpost about upgrading Fortnite to UE5). You won’t eliminate the overdraw completely, but it will significantly reduce it and can give you a pretty sizeable frame time reduction. Masked materials on Nanite are actually very expensive, even in situations with limited overdraw, and should be used sparingly.
Basically, the problem is that Nanite overdraw occurs when a cluster or clusters can’t be occlusion culled because some part of it is visible (which is why it mostly occurs around object intersections), and masked materials mess that up more because the clusters are still visible, even when the final pixel isn’t.
This talk from GDC also goes into some other methods to improve nanite foliage performance