Adding a Custom Depth material at runtime does not make the object its applied to render through walls.
Tested in 4.22.3 (CL - 7053647), 4.23 (CL - 8386587), 4.24 (CL - 9413529)
Expected: The ActorWithChild Blueprint should be visible through the wall
Result: The ActorWithChild Blueprint is invisible through the wall
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-81362 in the post.