### Godot version

4.0 Beta 11

### System information

Windows 10 version 22H2, GeForce Game Ready Driver Version 528.02, GTX 1070

### Issue description

Since Beta 11 this error is given whenever a project is run in the forward+ renderer with OpenXR enabled. This error is not present with Beta 10 and previous versions.
![image](https://user-images.githubusercontent.com/38119387/212044209-1179b908-f010-47a1-ae53-bc2faadc30de.png)

I've tested with projects created in previous versions as well as the current version (Beta 11)

### Steps to reproduce

Create project, enable OpenXR in project settings, and run.

### Minimal reproduction project

N/A
singleton = this;
	if (Engine::get_singleton()->is_editor_hint()) {
		
	} else {
		
		int ff = GLOBAL_GET("xr/openxr/form_factor");
		switch (ff) {
			case 0: {
				form_factor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
			} break;
			case 1: {
				form_factor = XR_FORM_FACTOR_HANDHELD_DISPLAY;
			} break;
			default:
				break;
		}
		int vc = GLOBAL_GET("xr/openxr/view_configuration");
		switch (vc) {
			case 0: {
				view_configuration = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_MONO;
			} break;
			case 1: {
				view_configuration = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO;