Depth Map Generation in UE5

I was wondering if a feature exists to generate ground truth depth maps in unreal engine 5, particularly using python code. I know there is unrealcv but to the best of my knowledge, it does not work on UE5. Also there is the default mask but some objects that are far enough away seem to give inaccurate data (ex: the sky dome creates a variety of distance values). Is there any other python/unreal functionality that could create a good ground truth depth map?