When rendering a custom QQuickItem with opengl/d3d12 backend, the z-order is invalid. This can be seen when drawing for example "Button" qml component, the custom item is rendered in between the Button's text and the background rectangle.
This can be reproduced with the rendernode example by adding a simple "Button" after the custom item:
Some other components such as Slider, Text, WebView are properly rendered on top of the custom item in this scenario.
When using "software" backend
the issue does not reproduce.
Attached screenshot of the problematic situation.