I think I might have found a fix for this. I can’t test it on my system, because I don’t hear the sound when I use Firefox (which is probably the only GTK app I use apart from Pamac’s GUI).
Open your ~/.config/gtk-3.0/settings.ini & ~/.config/gtk-4.0/settings.ini files and add the following line to the [Settings] section of each:
gtk-enable-input-feedback-sounds=false
You may also need to add this line:
gtk-enable-event-sounds=false
Then log out & back in for the changes to take effect.
Source of the above advice:
A possible alternative solution is in a post at the end of that thread, where the poster says all they had to do to stop the clicking sound was
to check and then uncheck “Enable notification sounds” in KDE System Settings -> Colors & Themes -> System Sound (hitting Apply after each change). This checkbox appeared unchecked already, but I assume it was actually out of sync with some config file, and checking and unchecking again fixed it.
So, even if the “Enable notification sounds” is not enabled, it may require re-enabling & then disabling again to stop the sounds when clicking on GTK apps.
I had stopped these annoying clicks last week by disabling the notification sounds but never considered that re-enabling them would reset/fix it. That works nicely, though I did have to reboot to get it to work. Thanks for the tip!!
Edit of an edit: Here was the key for me that fixed it finally. The “alternative solution” still allowed some annoying click noise whenever I used some toolbars. I had to go back to editing the settings.ini files for gtk 3 and 4 and modifying and/or adding the two lines mentioned in @scotty65’s post. For me specifically, I had to add the line
gtk-enable-input-feedback-sounds=false
to the settings.ini files for the fix to finally work (after a logoff/logon, of course).