### Godot version

v4.1.beta3.official [ada712e06]

### System information

Godot v4.1.beta3 - Windows 10.0.22621 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 2080 with Max-Q Design (NVIDIA; 31.0.15.3161) - Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz (12 Threads)

### Issue description

I am using the main renderingdevice to do offscreen drawing to a texture. If I use the same code on a local rendering device created using `RenderingServer.create_local_rendering_device()`, it works fine, but the moment I do anything on the main rendering device (from RenderingServer.get_rendering_device() ), my code will run for one or two frames, then the game quits silently.

I've narrowed it down with a passthrough shader and no actual draw calls - just any call to `draw_list_begin` and `draw_list_end`, and it dies.

If you use single threaded renderingdevice, it works.

I feel like this is a good test of the stability of the vulkan multithreading ( see https://github.com/godotengine/godot-proposals/discussions/7163 ) - if we want to allow multithreaded use of a single renderingdevice, then this should work.

### Steps to reproduce

Hit play on the project below. It will hopefully print out before, inside, after, then silently quit. Does on mine at least, on dev builds and on 4.1b3. If you set rendering to single-threaded (safe or unsafe), then it works happily.



### Minimal reproduction project

[crashtest.zip](https://github.com/godotengine/godot/files/11892220/crashtest.zip)

return texture_owner.owns(p_texture);
}
Size2i RenderingDeviceVulkan::texture_size(RID p_texture) {
	_THREAD_SAFE_METHOD_
	Texture *tex = texture_owner.get_or_null(p_texture);
	ERR_FAIL_COND_V(!tex, Size2i());
	return Size2i(tex->width, tex->height);
}
uint64_t RenderingDeviceVulkan::texture_get_native_handle(RID p_texture) {
	_THREAD_SAFE_METHOD_
	Texture *tex = texture_owner.get_or_null(p_texture);
	ERR_FAIL_COND_V(!tex, 0);
	return (uint64_t)tex->image;
}
Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, BitField<BarrierMask> p_post_barrier) {
	_THREAD_SAFE_METHOD_
	Texture *src_tex = texture_owner.get_or_null(p_from_texture);
	ERR_FAIL_COND_V(!src_tex, ERR_INVALID_PARAMETER);
	ERR_FAIL_COND_V_MSG(src_tex->bound, ERR_INVALID_PARAMETER,
			"Source texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to `RenderingDevice.FINAL_ACTION_CONTINUE`) to copy this texture.");
	ERR_FAIL_COND_V_MSG(!(src_tex->usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT), ERR_INVALID_PARAMETER,
			"Source texture requires the `RenderingDevice.TEXTURE_USAGE_CAN_COPY_FROM_BIT` to be set to be retrieved.");
	uint32_t src_layer_count = src_tex->layers;
	uint32_t src_width, src_height, src_depth;
	get_image_format_required_size(src_tex->format, src_tex->width, src_tex->height, src_tex->depth, p_src_mipmap + 1, &src_width, &src_height, &src_depth);
	if (src_tex->type == TEXTURE_TYPE_CUBE || src_tex->type == TEXTURE_TYPE_CUBE_ARRAY) {
		src_layer_count *= 6;