Don't hide the panel when trying to hide the tooltip
The workaround unfortunately has a flaw. The mainItem is only parented to the dialog on show, this results in hiding the panel when no tooltip was shown yet. TooltipArea annoyingly has no property to query if the tooltip is shown, so we check if it's a different window than the one of task.