It is never too late for someone who has strayed away from HaShem to come back. Sarah kept fighting for Ismael to repent. This fight brought a profound change in Ismael.
“Shortly after Isaac married Rebecca, Abraham remarried Hagar, and had six more sons through her. Years later, when he was 175 years old, Abraham died.
[Abraham’s] sons – Isaac and Ishmael – buried him in the Machpeilah Cave. Genesis 25:9
Isaac is mentioned first, indicating that although Ishmael was the elder son, he allowed Isaac to lead the funeral. Ishmael thus demonstrated that he had truly repented: His primary sin had been his claim to Isaac’s inheritance; it was only after Abraham died that Ishmael could have made this claim, yet he did not.
Sarah deserves the credit for Ishmael’s improvement of character. Her insistence on directing Ishmael properly eventually led him to repent enough to recognize the truth of Isaac’s primacy. Following Sarah’s example, we too should not give up or shy away from correcting and assisting those who truly need our help in the ongoing challenge of self-refinement.1 Likutei Sichot, vol. 15, pp. 149–150.