Locking macOS Dock Content

defaults write com.apple.Dock position-immutable -bool yes; killall Dock