Not idea solution, but you can build up a simple HDRP/Canvas shadergraph to display your ui elements, and this should properly handle the depth of canvas elements.
Indeed, the UI target is not available in 2022.3.
One solution would be to use a Custom Pass. Set the canvas objects in a dedicated layer (let say, the unmodifiable layer 5 “UI” ), not visible from the camera culling mask, but drawn with a “Draw Renderers Custom Pass” in the After Post Process injection point.