I poked around with it and got the same behavior you did, where Mario just stays on the screen. If you force the Y velocity to 0, Mario freezes when he dies, then slowly falls down the screen in a comical way.
Anyway, it looks like the sprite Y position is used not just for positioning the sprite, but also as a sort of timer or indicator for when to restart the level. So it's not as easy as I hoped.
The real challenge is that there is not enough space to add code to the ROM. I recommend starting with an expanded version of the ROM, such as this one https://www.romhacking.net/hacks/2432/
. Then you have to manage bank switching, where you overwrite some code in the ROM to temporarily swap your new code into memory. I have done it, but I'm not wise enough to advise how to do it. There are others who can help, though. Search for posts from Disch and KingMike. You can also read about it at wiki.nesdev.com, although that site is rather technical for a beginner.