USB drives and other external storage devices are automatically mounted when they’re attached. For example, using Caja in KDE. In the Caja settings, “Media Handling” is already disabled. Where is the hidden setting to disable auto-mounts?
Caja is the basic file browser from the Mate desktop. Have a look in kde’s default file browser. I think it is still dolphin?
Or this might help: