Baptism of desire is not applied at death. Look again at the example of St. Thomas that was cited here in this very thread. Those who desire the sacrament of baptism receive the forgiveness of sins and infusion of grace before they receive the sacrament of baptism not merely at death, but when they begin to desire the sacrament. In case his meaning is unclear there, here is another passage where his meaning is ambiguous.
As stated above (1, ad 2; 68, 2) man receives the forgiveness of sins before Baptism in so far as he has Baptism of desire, explicitly or implicitly; and yet when he actually receives Baptism, he receives a fuller remission, as to the remission of the entire punishment. So also before Baptism Cornelius and others like him receive grace and virtues through their faith in Christ and their desire for Baptism, implicit or explicit: but afterwards when baptized, they receive a yet greater fulness of grace and virtues. Hence in Psalm 22:2, “He hath brought me up on the water of refreshment,” a gloss says: “He has brought us up by an increase of virtue and good deeds in Baptism.”
(III, q. 69, a. 4, ad. 2)
In his example, he states that Cornelius received sanctifying grace before his baptism. He says, that sanctifying grace is received before baptism, and only that they receive a greater fullness of grace (along with the the sacramental character, which he does not mention here, but does discuss elsewhere).
EDIT: Looking back over the thread, I now see that the passage Todd posted was the same one I just did. I think that should have settled it the first time it was posted, but I’ll leave my post up in case it’s helpful to see it twice.