Scene Capture is not working with Capture source = SceneDepth in R

SceneCaptureComponent2D with capture source as SceneDepth in R, produces a scene depth map which is always 1 for all the pixels. When I tried moving the capture component around the scene, sometimes, there seems to be data between 0 to 1. Is there any clipping happening before the scene capture component receives the depth buffer ?

How can I capture scene depth properly ? I would like to export the depth into an exr file.

SceneDepth in R is not supposed to return value between 0 and 1. It writes HDR value into a red channel, so a render target format must be matched accordingly.