This worked for me
I found a solution to this problem, but I'm sorry it's coming two months later!
I had the same problem this morning. No sound from built-in speaker, but only on games. Videos worked fine, although I didn't check YouTube. Headphones worked when I plugged them in (good suggestion there, but did you forget to add a possible fix?). Toggle button was set to screen lock, not mute, in settings. However, I changed the setting to mute, and then back again to screen lock. That fixed the problem. Clearly, this is a bug that needs fixing.
I hope this helps someone else!