Yeah this is a bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/4195
This happens on any GTK apps on KDE as well, so it seems to be a toolkit bug instead of compositor bug.
Apparently this happens only when you have a mouse that have those additional buttons that are exposed as a "keyboard" to the system :)
So half of all wireless Logitech mice then...