Desactivate media key mac
The most consistent and easiest way I’ve found to stop iTunes from listening for the Play/Pause button key was to stop the Launch Agent com.apple.rcd
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
Similarly, the Launch agent can be re-enabled so that iTunes listens for the Play / Pause key again with the command:
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist