Gaze cursor rendering behind canvas

Goal: I have a custom gaze cursor (not built on an existing XR framework) that I want to always be overlaid on top of all other world space objects and UI.

Problem: When a world space canvas’s “order in layer” field is set to > 0, the canvas renders on top of my gaze cursor. So I’m looking for any info about why this happens and what can be done about it.

Details:
My gaze cursor is a quad-like mesh with a transparent material. I have previously been getting the cursor to overlay other transparent objects by increasing the render queue value of the material to around 3050. But that doesn’t seem to work on canvases if their “order in layer” is above zero (I tried cursor render queues as high as 5000). The issue happens regardless of whether the cursor is in front of or behind the canvas. Currently using Unity 2019.3.6, targeting Android.

Here is a sample Unity project that reproduces the problem: Gaze Cursor Render Order Test.zip

6630043–755956–Gaze Cursor Render Order Test.zip (20.7 KB)

I was able to fix this by increasing the “sorting order” of the cursor mesh renderer: Unity - Scripting API: Renderer.sortingOrder