Prevent people from abandoning first.
I'd be helpful in tell us what you run on a Junker to find out if people left because of the loadout, don't take this personaly it's not meant as an insult, but many new players run loadouts that don't realy work.
Now if the loadout wasn't the problem and maybe your piloting isn't at its best, don't feel bad about that either, we were all at that point some time ago. It's good to talk with your crew and make the game a fun experience for them, even if you're losing, people will be inclined to stay on your ship and go through with it.
If people STILL leave after this, well, that's a shame for them, there's realy nothing you can do to if you are abandoned than what you have already mentioned, just stay close to your ally and hope AI's can shoot correctly.
Though, AIs or not, sticking close to your ally and focusing down the same target is something you want to do anyway.
Fly safe!