I have been facing this problem for quite some time. Last few months to be precise.
It keeps saying "You're offline" when on WiFi. So, I disconnect the WiFi and reload the Youtube app on Mobile Data and then turn on WiFi again.
Starts working fine after that.
But really, how many times can one do this?
If it was few times every month, it would have been fine. But its almost a daily occurrence or 3/4 times in a week which is ridiculous.