You don't know too much about the Bat-Man, do you? ;-)
And storytelling-wise, how this was set up, Vader had to lose. Becauae he's the big baddie. It was Bat's story, letting the antagonist win in the end is a huge "eff the audience and their expectations, just for spectacle!" If it had been another character wihout any heroic background, okay, but setting up the premise by choosing the characters alone establishes rules that I expect a movie to follow.
Batman could have won by escaping and freeing Supes (who must have had a reeeeally bad day to lgwt himswlf captured) no need to kill Vader. Vader switching Bats lifelight off, noz appropriate for such a larger than life character. That short movie deserves an alternate ending.