You can prevent it on Safari for macOS by right clicking > open (instead of Open in Music)