An alternative method to this is to use render layers and ‘camera stacking’ where one camera renders the world and another camera renders the UI on top: https://playcanvas.com/project/940278/overview/ui-rendering-on-top-with-layers
This has the drawbacks of needing to keep two cameras in ‘sync’ with properties but the advantage is that you don’t have to mess around with materials.
See also: [SOLVED] Render Object Over Another Objects - #4 by yaustar
And [SOLVED] Layers and affect of the 'Order' - #7 by yaustar