So if you have XR enabled, and you have a screenspace UI (eg: I have a debug menu on my desktop display), Unity throws this warning in the console at runtime:
My response: Yes! This is intentional. Please stop showing me this warning!
We have a “zero warnings” policy and seeing this every single time sets off a bunch of our automatic script klaxon alarms, heh.
My suggestion would be to show the warning in the inspector, but you already do!

I think this should be enough, and the console log shouldn’t be thrown.