The brave browser will actually allow you play your videos in the background while your screen is off. Just open youtube in brave and play the video, but make sure you full screen the video then lock your screen and you should be golden. You can do this with any video website as well, not just youtube of course.