Bluetooth disconnects when starting to play music
Please do share which version of Android is installed.

Assumption made, there was a recent update to Moto Z  to Android 7.1. There is a high possibility that the bluetooth headset + Moto Z + Wifi versions are now at conflict. From experience with most bluetooth devices, Moto Z will have to rollout a fix or you can get another headset. 

Or you can try this


Disable the wifi + hotspot.
Unpair the devices.
Restart both Moto Z handset and the headphone.
Pair both devices.


Looks like a long list, but takes less than 2 minutes to do. Hope it helps.