My presumption would be the game stops playback of anything that isn't game sound. This may likely happen even if you mute the sound from the game.
Have you tried playing music stored locally on the device? What device do you have? What OS are you running? What game are you playing? Is it all games? Did it used to work and now doesn't? Does the game use Google Play Games to keep score, achievements, and game saves?