The best solution to this is IMO to think along their own lines and making it an even more waste of time to leave before the end.:
Faction Penalty for the leavers!!!!!!!!!!!!!
It also makes kinda sense, dont you also lose faction for your alliance if you show some support for the other alliance? So why cant it be so that you also lose faction when you leave your comrades in the middle of a battle. Its both treachery

I say that the penalty should be around 300 faction. Large enough to stop the pessimistic leavers from leaving and small enough for the people not to mind the penalty when they REALLY need to go for r/l stuff etc.
So, what do you say?