Disable auto-app switch on Xperia Z3 when headphones are plugged in
It's the Smart Connect app. You can simply toggle it off under the Events tab.
Smart Connect starts up any app or action that you have associated with specific accessory such as Headphones.