I made a phone call during which I switched to speakerphone several times. After the conversation ended, the audio lags disappeared. YouTube, Spotify, and system sounds are working properly not freezing phone.
EDIT. After a few minutes the lag came back. I didn't do anything special, exchanged...