First, Calvinists are well aware that even in the Old Testament such a resurrection of all the dead is clear teaching. The prophet Daniel was told by the angel that, at the time of the end, some would rise from the dust of the earth "to everlasting life, and some to shame and everlasting contempt." (Daniel 12:1-3) However, that text does not speak of doing good works being a way of "earning salvation".
It is the same with Jesus' words in John 5:28-29. He contrasts those resurrected ones who "have done good" with those who "have done evil". Nowhere does Jesus say that one must do good works as a way of "earning salvation". The idea of "earning salvation" may be read into Jesus' words by those who believe people have to do something to merit salvation, or to contribute towards it, but to Calvinists who believe that salvation is not merited, or earned by anybody due to good things they do, that is to put the cart before the horse. Here is what Calvin himself wrote in his "Institutes", Chapter XXI, headed 'Eternal Election, by which God has predestined some to salvation, others to destruction":
"We shall never be clearly persuaded, as we ought to be, that our
salvation flows from the wellspring of God's free mercy until we come
to know his eternal election, which illumines God's grace by this
contrast: that he does not indiscriminately adopt all into the hope of
salvation but gives to some what he denies to others.
[Re. Romans 11:5-6 'Even so then at this present time also there is a remnant according to the election of grace. And if by grace, then it
is no more of works, otherwise grace is no more grace. But if it be of
works, then it is no more grace: otherwise work is no more work.']
For neither will anything else suffice to make us humble as we ought
to be nor shall we otherwise sincerely feel how much we are obliged to
God. And as Christ teaches, here is our only ground for firmness and
confidence: in order to free us of all fear and render us victorious
amid so many dangers, snares, and mortal struggles, he promises that
whatever the Father has entrusted into his keeping will be safe. John
10:28-29." Calvin: Institutes of the Christian Religion Vol. 2, Ed.
John T. McNeill, pp 921-2, The Westminster Press, Philadelphia MCMLX
Calvin put the "horse" of God's election before the "cart" of salvation. Salvation can only follow after God's choosing and grace then enables the person he is saving to do good works that will bring glory to himself: not rack up a credit balance of any kind. That may be why I could not spot reference to John 5:28-29 here, because that text is speaking of the Day of Resurrection and Judgment, not the matter of what saves a person.
Here is another quote from the Calvinist point of view that shows why different people see that text differently. The author is a Presbyterian minister in America, summarizing main points from Calvin's "Institutes".
"The human order is first faith, then election, but the 'divine order'
according to Calvin, is first election, then faith." Knowing God and
Ourselves, David B. Calhoun, p. 224, Banner of Truth Trust, 2016
Consider what Baptist C.H. Spurgeon said as quoted from his 'A Defence of Calvinism', The Early Years: The Autobiography of C.H. Spurgeon, thinking from the present backwards:
"One week night... the thought struck me, How did you come to be a
Christian? I sought the Lord. But how did you come to seek the Lord?
The truth flashed across my mind in a moment - I should not have
sought him unless there had been some previous influence in my mind to
make me seek him. I prayed, thought I, but then I asked myself, How
came I to pray? I was induced to pray by reading the Scripture. How
came I to read the Scriptures? ...Then... I saw that God was at the
bottom of it all, and that he was the author of my faith, and so the
whole doctrine of grace opened up to me." (Ibid. p. 224)
In conclusion, here are some points Calvin wrote about regarding the final resurrection - which Jesus was speaking of in John 5:28-29. This chapter is called 'The Final Resurrection':
"In Book III John Calvin has presented at length the redemptive work
of Christ, the mediator, and the ministry of the Holy Spirit, who
creates and unites believers to Christ. They thereby receive the
double benefit of justification and sanctification - acceptance with
God and renewal after the image of God. 'In union with Christ,
believers are justified, sanctified, and ultimately glorified.
Considering the location of chapter 25 in the Institutes [at the end
of Book III], it might well be titled, "The Believer's Glorification
in Union with Christ" (Venema, Theological Guide to Calvin's
Institutes, 445). Preaching on Matthew 28:1-10, Calvin said that we
are nourished by Christ daily 'until we are united with him in his
glory in another fashion than we are now' (John Calvin: Writings on
Pastoral Piety, 123)." (Ibid. p. 239)
John 5:28-29 deals with that Day of Resurrection, when the saved will be united with Christ in glory. Calvinists don't view it as teaching how anyone is to be saved, for they are already declared the righteousness of God in Christ by having previously been elected unto salvation, their good works following. (Philippians 3:9 - "...be found in him, not having mine own righteousness, which is of the law, but that which is through the faith of Christ, the righteousness which is of God by faith.") But no amount of good works can give that righteousness that saves!