Annoying issue on Ubuntu 21 and minimizing TeamViewer

I have an annoying issue with TeamViewer on Ubuntu 21, it's not aware that the window is minimized, and it keeps forwarding mouse and keyboard events to the remote computer. Mouse cursor isn't changing when I hover over editable text on my local screen. It's like the TeamViewer window isn't minimized, but became a transparent layer over the all other windows.

When I make TeamViewer window smaller, and click outside of it, I get red notification saying that Keystrokes aren't sent to the remote computer, but when I minimize it, I don't get such a notification.

Tagged: