### Godot version

v4.1.beta.custom_build [d7af287ce]

### System information

EndeavourOS Linux, KDE plasma Wayland

### Issue description

When opening any menu or hovering above nodes or properties the editor just freezes. The console doesn't print anything when this happens. On X11 works fine. It doesn't matter if its a new project or an old one. On the beta 2 also works as normal, so it's a regression between beta 2 and now.

### Steps to reproduce

Using Wayland, create a new project and open any menu and the editor freezes.

### Minimal reproduction project

N/A
LocalDevice *ld = local_device_owner.get_or_null(p_local_device);
	return ld->device;
}
void VulkanContext::local_device_push_command_buffers(RID p_local_device, const VkCommandBuffer *p_buffers, int p_count) {
	LocalDevice *ld = local_device_owner.get_or_null(p_local_device);
	ERR_FAIL_COND(ld->waiting);
	VkSubmitInfo submit_info;
	submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
	submit_info.pNext = nullptr;
	submit_info.pWaitDstStageMask = nullptr;
	submit_info.waitSemaphoreCount = 0;
	submit_info.pWaitSemaphores = nullptr;
	submit_info.commandBufferCount = p_count;
	submit_info.pCommandBuffers = p_buffers;
	submit_info.signalSemaphoreCount = 0;
	submit_info.pSignalSemaphores = nullptr;
	VkResult err = vkQueueSubmit(ld->queue, 1, &submit_info, VK_NULL_HANDLE);
	if (err == VK_ERROR_OUT_OF_HOST_MEMORY) {
		print_line("Vulkan: Out of host memory!");
	}
	if (err == VK_ERROR_OUT_OF_DEVICE_MEMORY) {
		print_line("Vulkan: Out of device memory!");
	}
	if (err == VK_ERROR_DEVICE_LOST) {
		print_line("Vulkan: Device lost!");
	}
	ERR_FAIL_COND(err);
	ld->waiting = true;
}
void VulkanContext::local_device_sync(RID p_local_device) {