When switching to a window with an open dialog, it also raises the parent window (which is expected). It would be very nice, if this fact was reflected in the "Show selected window" mode of the Tab switcher by also (temporarily) raising and showing the parent window. I sometimes fail to find a window using Alt+Tab, until I understand that I had a dialog open on it.
If dialog is opened in app Kate for example and checkbox 'Only one window per application' is checked - parent Kate window isn't displayed at all. Maybe parent and dialog windows can be stacked together and displayed as one window in task switcher
Showing both parent and a modal dialog can be a bit confusing. I think a better thing might be to show only the parent if a dialog is modal. That's what the task manager does.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7757