UI that can be seen by HMD,but not to be blocked

If do like this,UI can’t be detected by a ray