Captain Barbossa died to save his daughter in Pirates of the Caribbean: Dead Men Tell No Tales, but it might not have been enough to redeem his past misdeed. The pirate anti-hero flip-flopped sides several times throughout the movie, and Jack Sparrow could never entirely trust him. He was guilty of murder, betrayal, kidnapping, and several other atrocities, and no amount of good deeds could change this. Still, it did nothing to lower his likability, and his sacrificial end in Pirates of the Caribbean was all the more impactful as a result.
https://screenrant.com/pirates-caribbean-barbossa-redemption-not-deserve-reason/