Penlope Cruz joined up with the Pirates of the Caribbean franchise for the fourth installment, but she was notably absent from the following film. The actor had played Angelica in Pirates of the Caribbean: On Stranger Tides, the daughter of Black Beard and an old flame of Captain Jack Sparrow’s. She was an intriguing, likable, and somewhat tragic character who fit right in with the morally ambiguous pirates of the overall franchise. It really seemed as if Cruz’s Pirates of the Caribbean character was being set up as a franchise regular. However, she only appeared in this one movie.
https://screenrant.com/penelope-cruz-did-not-return-pirates-of-the-caribbean-explained/