Try putting a wall in front of the spawn area that blocks all enemy projectiles but let's alley projectiles pass through.
reason 1: your team gets pushed back by spawn campers with no where to go so If this was to happen, they'd have a place to fall back to and at least have a chance so there not just spawning and dying
Reason 2: it would encourage people to stop spawn killing hopefully because if they did try, they would be at a disadvantage because of the wall
Reason 3: the people who left because of spawn killing might come back if they knew that you fixed this problem