Disable Apple Music starting when Bluetooth connects

Solution 1:

Music in macOS Big Sur resides on a cryptographically signed read-only volume and why you cannot by default delete it. With the right modifications technically it can be done, however, due to the fact and an update/upgrade of macOS will just put it back, and or breaking the seal prevents the use of FileVault, and having other options, I'm not going to get into the details of the technicality.

If you do not find the direct cause of the issue and are unable to fix it without some sort of an easy settings change, then I offer the following as either a temporary workaround or ongoing one until such time you find another solution to your issue.

I've never experienced that issue, however if I did, here is what I do as a temporary/ongoing workaround...

I'd install Hammerspoon and add the following example Lua code to its init.lua file:

function applicationMusicWatcher(appName, eventType, appObject)
    if (eventType == hs.application.watcher.launching) then
        if (appName == "Music") then
            local op, stat, typ, ec = hs.execute([["/usr/bin/killall" "Music"]])
            if not (ec == 0) then
                msg = "An error occurred terminating Music."
                hs.notify.new({title="Hammerspoon", informativeText=msg}):send()
            end                     
        end
    end
end
appMusicWatcher = hs.application.watcher.new(applicationMusicWatcher)
appMusicWatcher:start()

Notes:

This will immediately terminate Music upon it starting to launch.

You may/will see the icon for Music bounce briefly in the Dock, although I would think that is better than manually having to close it each time.

I am not affiliated with the developers of Hammerspoon, just a satisfied user of the product.