Thanks for playing!
The friends leave when they take too much damage OR when the player takes too much damage. I understand this is not explained in the game and thus can be confusing. I also feel like having a wall of text to explain every detail kind of spoils the experience, but I'll try and find a middle ground for my future games!