it appears that meshes cannot be removed from the main pass and still write to the custom depth pass when using ES3.1
Result: When ES3.1 preview is enabled the cylinder with Render in Main pass disabled becomes visible
Expected: The Cylinder would remain invisible and only render to custom depth
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-77463 in the post.