It’s not about Jaime’s arc, it’s about hers.
All Brienne has wanted for some time is to live up to the highest ideals of true knighthood, by selflessly giving her life to save her charge, just like Aemon Dragonknight, etc. Twice she has failed (Renly, Catelyn) for reasons entirely outside of her control, so following the third, she will go down swinging heroically in a judicial duel witnessed by the gods.
As with Syrio Forel, that’s her version of a beautiful death.