In order to hide hover cards for inactive apps in taskbar of Windows 11, go to Settings > Personalization > Taskbar > Taskbar behaviors > Uncheck “Show hover cards for inactive and pinned taskbar apps ...
I've been using Windows 11 for over two years now, and during that time I've customized it in many ways to work well for me.