An artifact is seen in package builds when an instance with a base material parented by a base material with no WPO output is set to Opaque and a layer with WPO output is used. Since the WPO is ignored in the Depth pass, there appears to be a difference with the Depth value output by BasePass. The result is a fallback to the default WorldGridMaterial with no additional depth shaders.
DepthNoPixelPipeline is ultimately determined by TDepthOnlyVS<>::ShouldCompilePermutation, but bMaterialMayModifyMeshPosition is initialized with FMaterial::Mate MaterialMayModifyMeshPosition is initialized and does not reflect the contents of the MaterialInstance.
This can be avoided by not using a material layer.
Drawing artifacts occur (see attached Artifact.png)
Artifacts do not occur
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-172947 in the post.