Disable Command-W Everywhere
System Preferences -&gt; Keyboard -&gt; Shortcuts -&gt; App Shortcuts


Just add a new CMD-W shortcut should override the actual behavior. 

Edit: https://discussions.apple.com/thread/7634486