### Godot version

4.1.1

### System information

Meta Quest 2 - GLES3

### Issue description

When writing VR applications on Godot 4 using gl_compatibility, skeleton-driven meshes like hands are often rendered corrupted, or sometimes update slowly.

### Steps to reproduce

The godot-xr-tools demo projects have these issues in the climbing/gliding and pointer-demo scenes if the project is switched to gl_compatibility mode and run on a mobile VR headset.

### Minimal reproduction project

The godot-xr-tools demo project has been the testing project for this issue.
}
	glBindBuffer(GL_ARRAY_BUFFER, 0);
	s->vertex_count = p_surface.vertex_count;
	if (p_surface.format & RS::ARRAY_FORMAT_BONES) {
		mesh->has_bone_weights = true;
	}
	if (p_surface.index_count) {
		bool is_index_16 = p_surface.vertex_count <= 65536 && p_surface.vertex_count > 0;
		glGenBuffers(1, &s->index_buffer);
		glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->index_buffer);
		GLES3::Utilities::get_singleton()->buffer_allocate_data(GL_ELEMENT_ARRAY_BUFFER, s->index_buffer, p_surface.index_data.size(), p_surface.index_data.ptr(), GL_STATIC_DRAW, "Mesh index buffer");
		glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 
		s->index_count = p_surface.index_count;
		s->index_buffer_size = p_surface.index_data.size();
		if (p_surface.lods.size()) {
			s->lods = memnew_arr(Mesh::Surface::LOD, p_surface.lods.size());
			s->lod_count = p_surface.lods.size();
			for (int i = 0; i < p_surface.lods.size(); i++) {
				glGenBuffers(1, &s->lods[i].index_buffer);
				glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->lods[i].index_buffer);
				GLES3::Utilities::get_singleton()->buffer_allocate_data(GL_ELEMENT_ARRAY_BUFFER, s->lods[i].index_buffer, p_surface.lods[i].index_data.size(), p_surface.lods[i].index_data.ptr(), GL_STATIC_DRAW, "Mesh index buffer LOD[" + itos(i) + "]");
				glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 
				s->lods[i].edge_length = p_surface.lods[i].edge_length;
				s->lods[i].index_count = p_surface.lods[i].index_data.size() / (is_index_16 ? 2 : 4);
				s->lods[i].index_buffer_size = p_surface.lods[i].index_data.size();
			}
		}
	}
	ERR_FAIL_COND_MSG(!p_surface.index_count && !p_surface.vertex_count, "Meshes must contain a vertex array, an index array, or both");
	s->aabb = p_surface.aabb;