Bluetooth headphones disconnect a few seconds after connecting on macOS
Try resetting the Bluetooth module.
Shift-Option click the BT menu bar item > Debug > Reset the Bluetooth module.
I found that Bluetooth actually works for all devices but for the audio ones.
Rebooting the Bluetooth module didn't do anything, but killing coreaudiod
solved my problem for good.
sudo kill -9 `ps ax | grep 'coreaudiod' | grep -v grep | awk '{print $1}'`