### Godot version

Godot v4.1.beta2.mono

### System information

Godot v4.1.beta2.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 31.0.15.1694) - AMD Ryzen 7 3800X 8-Core Processor (16 Threads)

### Issue description

The error message/exception of this bug can only be seen in the console (Godot_v4.1-beta2_mono_win64_console.exe) and will not show up in the in-engine console

**The Problem**
When closing an application/game that contains one or more MeshInstance3D objects that have BlendShapes, Godot will throw an exception for each of them in your scene

ERROR: Attempted to free invalid ID: 30150670417926
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8405)
![image](https://github.com/godotengine/godot/assets/45302427/ab29870f-ef51-44cd-b7ec-2e769a32e151)
![image](https://github.com/godotengine/godot/assets/45302427/3f7bbb0c-6d52-4d85-85f4-f6bc0b9a9498)

This same bug seems to occur also under certain circumstances when you have a imported .glb as child object in your Scene hierachy and you then make a inherited scene out of it from the FileSystem and save it.

### Steps to reproduce

(Since this exception involves Blender/3D, i've added also screenshots from blender to make it as accessable as possible for everyone)

1) Launch the Godot_v4.1-beta2_mono_win64_console.exe and create a new project using the Forward+ renderer

2) Go to [blender.org](https://www.blender.org/download/) and download Blender 3.5.1 (Windows)

3) Open up Blender 3.5.1 and create a new General File / new Project.
![image](https://github.com/godotengine/godot/assets/45302427/406bfff9-3dfa-4707-8feb-35a36bb4e971)

Select the Default Cube by Left-Clicking on it in the 3D-Viewport or in the hierachy on the right side of the screen.
![image](https://github.com/godotengine/godot/assets/45302427/47e100f4-9df4-4da7-ac62-0c7a976412da)

4) With the Cube selected - Click on the green triangle-icon on the vertical sidebar, right of the 3d-viewport. It displays "Object Data Properties" when hovering over it. Click on it.
![image](https://github.com/godotengine/godot/assets/45302427/7babda56-df07-4b04-b4e8-2c9c8f15ba57)

5) Open up the section "Shape Keys" and click twice on the [+] button right to it to add both the "Basis" and "Key1" Shape-Keys (Blend-Shapes)
![image](https://github.com/godotengine/godot/assets/45302427/5f27caf9-c34c-4d97-90fc-de01a455fa2a)

6) Export the file!
File > Export > gITF 2.0 (.glb / .gitf) and make sure to "Include" > "Limit To: Selected Objects" and saving it inside your Godot 4.1 Beta 2 project.
![image](https://github.com/godotengine/godot/assets/45302427/f1fdf73a-7226-4285-94de-ec7b187dde6b)
![image](https://github.com/godotengine/godot/assets/45302427/7cdb77bf-58d8-4c27-8686-7b1af92c7e1c)


7) Go back into Godot Engine and create a new scene based on Node or Node3D and then drag the imported model onto your scene's root node.
![image](https://github.com/godotengine/godot/assets/45302427/b54f98a1-7370-436a-9a2f-1d25e1eb52d7)

8) Hit "F5" to start the application and wait until the application window shows up. 

9) Then hit "F8" or use the [X] at the top right to close it. 

As a result of this, you'll see the exception NOT in your in-engine console, but in the seperate console window from which the engine launched
ERROR: Attempted to free invalid ID: 4127463571469
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:8405)

![image](https://github.com/godotengine/godot/assets/45302427/3f7bbb0c-6d52-4d85-85f4-f6bc0b9a9498)



A second way to reproduce this same exception is to 
10) In the FileSystem - create a "Inherited Scene" from the imported .glb 
![image](https://github.com/godotengine/godot/assets/45302427/040ba766-4465-475d-8a05-593db674949e)

11) The moment you open up the inherited scene and you try to save it using Ctrl+S, you get the exception also inside the in-engine console
![image](https://github.com/godotengine/godot/assets/45302427/9a47c131-d6e5-413d-a784-f853864cf972)
While in the launched console window you'll see this
![image](https://github.com/godotengine/godot/assets/45302427/640ab043-1f02-4684-a3df-56455d715227)

12) Navigate back to your main scene where the .glb is a child node. Now the MeshInstance3D is still there, but it visually either disappears or looks totally messed up! it wont fix itsself unless you "Reload Current Project". But then you get a different exception
![image](https://github.com/godotengine/godot/assets/45302427/77ccba28-b18d-4896-ac03-0e583caa0ccb)

13) If you delete the created .tscn file and repeat the same process from 10 to 12, you'll always get the same order of exceptions and the same problem will re-occur

### Minimal reproduction project

[rendering_device_vulkan_8405.zip](https://github.com/godotengine/godot/files/11781570/rendering_device_vulkan_8405.zip)

Extract the .zip
Launch the Godot_v4.1-beta2_mono_win64_console.exe
Include the project into Godot Engine 4.1 Beta 2
Start the project with node_3d.tscn as Main Scene (or Current Scene)
Close it
Checkout the Console Window
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
	ERR_FAIL_COND_V(!multimesh, Transform2D());
	ERR_FAIL_INDEX_V(p_index, multimesh->instances, Transform2D());
	ERR_FAIL_COND_V(multimesh->xform_format != RS::MULTIMESH_TRANSFORM_2D, Transform2D());
	_multimesh_make_local(multimesh);
	Transform2D t;
	{
		const float *r = multimesh->data_cache.ptr();
		const float *dataptr = r + p_index * multimesh->stride_cache;
		t.columns[0][0] = dataptr[0];
		t.columns[1][0] = dataptr[1];
		t.columns[2][0] = dataptr[3];
		t.columns[0][1] = dataptr[4];
		t.columns[1][1] = dataptr[5];
		t.columns[2][1] = dataptr[7];
	}
	return t;
}
Color MeshStorage::multimesh_instance_get_color(RID p_multimesh, int p_index) const {