This occurs because the earbuds and the phone use different Bluetooth connection profiles. A2DP (Advanced Audio Distribution Profile) is utilized for high-quality audio streaming, such as music playback. So when listening to music, the A2DP protocol is enabled. While HFP (Hands-Free Profile) is used for playing games. The transition between these profiles can sometimes cause the audio quality of the Xiaomi Buds 5 to become worse while playing games but normal while playing music. It is a normal phenomenon, the functionality of the earbuds remains unaffected. You can continue using them for playing games and playing music.