### Godot version

4.1 beta 3, 4.1 beta 1

### System information

Windows 10 - 4.1 beta 3 - Android 12

### Issue description

Crash when using SoftBody on android mobile.

### Steps to reproduce

- Simple scene setup using a plane softbody, camera.
- Export to android mobile.
- Immediate crash when open the app.

### Minimal reproduction project

[SoftbodyMobileTest.zip](https://github.com/godotengine/godot/files/11871734/SoftbodyMobileTest.zip)

if (texture_is_shared(E->get())) {
#ifdef DEV_ENABLED
					if (resource_names.has(E->get())) {
						print_line(String(" - ") + resource_names[E->get()]);
					}
#endif
					free(E->get());
					owned.erase(E);
				}
				E = N;
			}
			
			for (const RID &E : owned) {
#ifdef DEV_ENABLED
				if (resource_names.has(E)) {
					print_line(String(" - ") + resource_names[E]);
				}
#endif
				free(E);
			}
		}
	}
	
	for (int i = 0; i < frame_count; i++) {
		int f = (frame + i) % frame_count;
		_free_pending_resources(f);
		vkDestroyCommandPool(device, frames[i].command_pool, nullptr);
		vkDestroyQueryPool(device, frames[i].timestamp_pool, nullptr);
	}
	_update_pipeline_cache(true);