There’s quite a lot on this subject already, iOS specifically. They are aware, but more of these posts don’t speed a fix, only slow it down to stop and respond to every ticket about it. We managed to fix it for Android, and it’s now iOS. Google is doing A/B account-by-account stuff which is making this hard to fix.
But please, any remote effort to search the forum would have shown you are creating a duplicate topic on top of other duplicate topics which honestly should be locked at this point, we don’t need so many dupes on the same issue.
It’s just YouTube screwing with things in different ways. One of the older ways or kind of bypassing is to open another tab and switch to it. YouTube will continue playing in the background and will continue to do so even if you switch apps.
But if you’re actually on the YouTube page as your primary focus and then switch apps or whatever, it will stop. I’m pretty sure this is just YouTube with listeners or whatever for it as a means to try to prevent it from working. They want you to pay for YouTube Premium.