Why is the sound still playing out loud even though the Xiaomi Buds 5 Pro are connected to the phone?

The reason why the sound from music, videos, calls, etc., is still playing out loud even after connecting the earbuds to the phone is that the Media audio option is not selected.
After connecting the earbuds to the phone, tap [Settings] >> [Bluetooth], find [Xiaomi Buds 5 Pro] and tap the [>] on the right to enable Media audio.
Then follow these steps to troubleshoot:
1. On the phone’s Bluetooth settings page, disconnect and reconnect Bluetooth to restore;
2. Turn off Bluetooth on the phone, turn it back on, and wait for the earbuds and phone to automatically reconnect to restore;
3. Place both earbuds in the charging case, press the button on the case for 2 seconds, and re-pair Bluetooth to restore;
4. If none of the above works, try resetting to factory settings. Place both earbuds in the charging case with the lid open, press and hold the function button for 10 seconds until the indicator light flashes continuously to complete the factory reset.