In , companions can consistently be revived using the spell or Withers' services, meaning players often won't worry about losing their favorite characters.
Despite this, there are several different ways for companions to leave the party. The most common way players will probably experience this is through loss of approval — if the player makes too many decisions that a companion disapproves of, then they will no longer want to travel with them.
However, in these situations, the characters will often give the player some form of warning before they leave forever. Throughout the game, there are several instances where the player can make decisions which will cause companions to immediately and indefinitely depart from the party. Betraying characters during their defining moments will often result in them giving up on the player. In Act One, players will probably find it quite difficult to get rid of Shadowheart.
She's the companion with the most chances to recruit if players miss her initially, and if the player doesn't have high approval with her, then they can talk to her at the tiefling party to ask to be pointed in the right direction, meaning the game is generally built to keep her in the party.
However, there are some instances in her Act Two and Three questline which will cause her to leave. The most likely point where players will lose Shadowheart is in the Shadowfell in the gauntlet of Shar. She'll leave if the player goes into the Nightsong's prison without her, as she will see it as taking her chance to become a Dark Justiciar away from her.