Everytime another app use the camera or opening the camera app itself my spotify either pauses the music or more often crashs.
I have one Nexus 5X with pure android 8, I don't rebember if i had the same problem with my last phone.