So, if I have correctly understood your wish, you would like the power button to stop running applications when the screen is locked or at least to stop YouTube and music playing.
Though I am still making the first steps into android's knowledge, I think the only way would be rewriting the single apps in order to tell them to stop working (killed? Frozen?) when the screen is locked. I suppose that's their behavior in ios. On the other side, it would be a no way out remapping the power button so that it could close all running apps or some of them, because a bunch of Google code should be rewritten to modify its standard behavior. Another solution could be remapping a physical key for it to launch a single software (still to be written) whose aim should be to kill o freeze the above said applications.
IMHO it is so simple tapping on the running app and pressing the power button that no developer will ever spend a lot of time to build a solution like the ones I have just spoken about and, though I see it's a matter of taste, I think it would be better accepting android as it is