If you want to make a legal youtube app, you shouldn't use any youtube apis. You can only access things that a browser can access. That's how newpipe does it, and it works fine. I don't know if MS took that route.
There are plenty of GPL apps on the play store. There was some drama over vlc in the apple store due to GPL concerns, but I don't remember if there was real merit to that. In any case, newpipe's issue is different. For one, it doesn't show ads. So that would disqualify it from playstore anyway. Playstore is google's walled garden afterall. That doesn't mean that newpipe is doing something illegal.