OMG of course it is! I was stuck thinking it was a problem with the dock.
The problem is most likely a sticky "Command" key so the switcher is coming up when the key is stuck down and the the OP hits tab.
The Command +Tab task switcher should automatically disappear as soon as the Command key is released, but if you hold it down (or it is stuck down), it does what the OP describes, including disappearing when you click away from it.
For what it's worth, I use the built-in utility "Show Keyboard Viewer" to check on sticky keys. You enable it by:
- System Preferences, Keyboard preferences
- Input Sources tab
- "Show Input menu in menu bar" checkbox on the bottom of that window
Once that's enabled, then up in the menu bar there will be a tiny icon that when clicked will show the menu to:
- Show Emoji & Symbols
- Show Keyboard Viewer
-------------
- Open keyboard preferences
Selecting "Show Keyboard Viewer" brings up a small window with your keyboard layout displayed. And it will highlight each key as it is pressed.
The keyboard viewer window is designed to let you preview what you might get when the option key is pressed (it shows all the symbols on top of the keyboard image), but it's also very useful for diagnosing sticky keys on keyboards.
Bringing the window up and hitting command a few times should show if it's always showing released or only sometimes. And we still don't know if it's left or right Command key that's sticking.
A sticky/broken Command key on a Mac is basically hell. I'm kind of surprised the Command+Tab was the most visible problem.
[Disclaimer, the instructions above are for the latest macOS. The keyboard viewer has been around forever, but the way to display it has changed a little over the years. Your system might be a bit different.]