### Godot version

master CI builds

### System information

Linux / Editor with doubles and GCC sanitizers

### Issue description

The `Linux / Editor with doubles and GCC sanitizers` build can fail with a `attempting free on address which was not malloc()-ed` crash in the `Open and close editor (Vulkan)` step.

https://github.com/godotengine/godot/actions/runs/5366302204/jobs/9735786296#step:15:138
https://github.com/godotengine/godot/actions/runs/5389199469/jobs/9783070708?pr=78740#step:15:138

The failure doesn't seem related to either PR (in fact one of them is just a docs change). I have only seen this issue these two times, still probably worth looking into.

### Steps to reproduce

Open and close https://github.com/godotengine/regression-test-project/archive/4.0.zip using the Vulkan renderer.

### Minimal reproduction project

https://github.com/godotengine/regression-test-project/archive/4.0.zip
cmdbuf.commandBufferCount = 1;
					VkResult err = vkAllocateCommandBuffers(device, &cmdbuf, &command_buffer);
					ERR_FAIL_COND_V_MSG(err, ERR_CANT_CREATE, "vkAllocateCommandBuffers failed with error " + itos(err) + ".");
					split_draw_list_allocators.write[i].command_buffers.push_back(command_buffer);
				}
			}
		}
		draw_list = memnew_arr(DrawList, p_splits);
		draw_list_count = p_splits;
		draw_list_split = true;
		for (uint32_t i = 0; i < p_splits; i++) {
			
			VkCommandBuffer command_buffer = split_draw_list_allocators[i].command_buffers[frame];
			VkCommandBufferInheritanceInfo inheritance_info;
			inheritance_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO;
			inheritance_info.pNext = nullptr;
			inheritance_info.renderPass = draw_list_render_pass;
			inheritance_info.subpass = p_subpass;
			inheritance_info.framebuffer = draw_list_vkframebuffer;
			inheritance_info.occlusionQueryEnable = false;
			inheritance_info.queryFlags = 0; 
			inheritance_info.pipelineStatistics = 0;
			VkCommandBufferBeginInfo cmdbuf_begin;
			cmdbuf_begin.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
			cmdbuf_begin.pNext = nullptr;
			cmdbuf_begin.flags = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT;
			cmdbuf_begin.pInheritanceInfo = &inheritance_info;
			VkResult res = vkResetCommandBuffer(command_buffer, 0);
			if (res) {
				memdelete_arr(draw_list);