I've seen this issue several times, including just this morning.
Based on the discussion here: https://ubuntuforums.org/showthread.php?t=1860967, I tried
unity --replace from the command line.
The good news is that it fixed the issue; the bad news is it's only a bit less drastic than logging out or rebooting; it immediately killed almost all my GUI apps (only gedit and the terminal window remained).
Incidentally, there was a somewhat nonsensical message in the terminal:
WARNING: This is for compatibility with other desktop interfaces please use unity without --replace.
I have no idea what that means, or what we should type instead. But this command did put my task switcher back on top.