### 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
return draw_list_current_subpass;
}
RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_switch_to_next_pass() {
	_THREAD_SAFE_METHOD_
	ERR_FAIL_COND_V(draw_list == nullptr, INVALID_ID);
	ERR_FAIL_COND_V(draw_list_current_subpass >= draw_list_subpass_count - 1, INVALID_FORMAT_ID);
	draw_list_current_subpass++;
	Rect2i viewport;
	_draw_list_free(&viewport);
	vkCmdNextSubpass(frames[frame].draw_command_buffer, VK_SUBPASS_CONTENTS_INLINE);
	_draw_list_allocate(viewport, 0, draw_list_current_subpass);
	return int64_t(ID_TYPE_DRAW_LIST) << ID_BASE_SHIFT;
}
Error RenderingDeviceVulkan::draw_list_switch_to_next_pass_split(uint32_t p_splits, DrawListID *r_split_ids) {
	_THREAD_SAFE_METHOD_
	ERR_FAIL_COND_V(draw_list == nullptr, ERR_INVALID_PARAMETER);
	ERR_FAIL_COND_V(draw_list_current_subpass >= draw_list_subpass_count - 1, ERR_INVALID_PARAMETER);
	draw_list_current_subpass++;
	Rect2i viewport;
	_draw_list_free(&viewport);
	vkCmdNextSubpass(frames[frame].draw_command_buffer, VK_SUBPASS_CONTENTS_INLINE);
	_draw_list_allocate(viewport, p_splits, draw_list_current_subpass);
	for (uint32_t i = 0; i < p_splits; i++) {
		r_split_ids[i] = (int64_t(ID_TYPE_SPLIT_DRAW_LIST) << ID_BASE_SHIFT) + i;
	}
	return OK;
}
Error RenderingDeviceVulkan::_draw_list_allocate(const Rect2i &p_viewport, uint32_t p_splits, uint32_t p_subpass) {