Why doesn't YouTube play in the background or when locked on iPhone 7?

It used to work a few months ago but now doesn't work when you swipe up to control pannel. Why?

Because its a **** apple product

There's some apps that help to counteract this issue
on android there's some awesome popup video app or something,
it keeps the youtube video pop up on the top no matter what cha doing