Galaxy Buds: Music stops during sleep mode of mobile
According to Google Compatibility Definition Document policy on Android Pie(9.0) OS, playing music will be stopped when connected mobile device enters sleep mode if music related application is set as Sleeping apps on following path :
Settings > Device care > Battery > More > Settings > Sleeping apps
※ Through this path you can select applications that will never be able to run in the background.
Applications designated as Sleeping apps on settings will never be able to run in the background .