How do I disable the charging chime with Mojave on 2018 a MacBook?
In my case it did work after running this in the Terminal
(I am using a USB-C monitor for powering the MacBook Pro) 

defaults write com.apple.PowerChime ChimeOnNoHardware -bool true  
killall PowerChime


also this question discusses more ways to solve:


Turning Power Chime Off