When "custom depth = ON" and "render in main pass = OFF" actor turns black (4.24)

When porting my project to 4.24 I quickly found that some of my actors were suddenly black when both:
-Custom depth was enabled for the actor
-Render in main pass was disabled for the actor.

This issue was not present in 4.23 and affects my game quite a lot. I’m hoping someone can suggest some workarounds or a fix.

Steps to reproduce:

  1. Open new 4.24.1 scene
  2. Spawn a cube.
  3. Set cube to have “render in main pass” OFF
  4. Set cube to have “Custom Depth Pass” ON
  5. The item turns black (unexpectedly).

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks