Ok, this is embarrassing.
It turned out that (for some reason) the volume was set to -60 db in the playback audio setting, and this (for some reason) affects also the Kodi UI sound volume. The playback audio settings are separated from the general settings > system > audio, but the playback audio can be modified pressing the keyboard keys + and -. This, coupled with the weird behavior of Kodi that (for some reason) does not play UI sounds when using a controller, but only when using a keyboard.
It turned out to be a rather silly problem, but I leave it here hoping this can help others facing the same behavior.