Chronologically, Abraham is almost certainly dead by Gen.26. The young brothers Jacob and Esau, though living with Isaac and Rebekah, are beyond the age of majority (since the one has disposed of his birthright). Abraham was justified by faith, apart from works. His whole life (what we're told of it) is abundant evidence of that. His sins were not peccadilloes. His major stumblings are recorded for us, and are not "outweighed" by all his good work.
Abraham was a man who grew in grace, and did persevere. What 26:5 contains is a portion of a promise to Isaac. It is one man who is promised blessing--not for his own obedience--but in recognition of another man's faith as shown or proven by his life. The point of this episode is covenant renewal. Isaac cannot have confidence that God will continue to bless him as he saw his father blessed, if he adopts the worst of his father's examples, if he gives up on God's promises. God emphasizes how he delighted in Abraham's best moments.
And what happens in Gerar? Isaac's faith stumbles, and he sins almost exactly in the manner his father had done not just ONCE (Gen.12:14-18) but TWICE (Gen.20:2,9)! So, what happens with Abraham also happens with Isaac--God intervenes where faith fails and man disobeys, to preserve the man and the Lord's promise.
There is something, therefore, of divine irony in the Lord's statement. The promise doesn't actually rest on man's obedience at all. But we should expect some obedience to manifest itself in the life of faith. And that is genuine perseverance.