If you haven't seen it yet, NoTunes[1] does a great job of fixing the hijacking of the play button or when bluetooth headphones are connected or disconnected.
Re:You Might Also Like
by deafpolygon on Monday November 07, 2022 @11:41PM
(#33515927)
I think the complaint is that it shouldn't hijack the button in the first place.
Your command doesn't work. The music app actually lives at `/System/Applications/Music.app`. And since Monterey, I think, even sudo won't let you modify data in that folder because of macOS's built-in protections that cannot be disabled:
Even disabling SIP and booting into safe mode doesn't let you do this.