I think after you resurrect you should have 5 seconds of invinsibility I went up to a boss didn't know it would kill me if I touched it when I resurrected it was on top of me again I didn't have turrets yet but my base was virtually invincible I had to start a new game
upgrade all the machine gun stuff to max then plasma with the occasional magnet upgrade go straight repair and shield on your building energy is useless if you can repair fast enough stay in your base the whole time machineguns tear through everything