"Harvey, when we pray for a person who is seriously ill to recover, we always ask that God's will be done. So if that person dies, then it was God's will that his or her earthly life come to an end."
Um, no. Recall that death is God's final enemy, as St. Paul asserts, along with sin and the devil. Death (cf. Oscar Cullman, "Immortality of the Soul or Resurrection?" - 1956) is the enemy of God and serves no purpose in furthering God's will for anyone. We were not made for death, nor death for us.
God's will is to restore to Himself all that "sin, death, and the devil" has stolen, and He will do it through Christ.
To pray at the death bed that God's will be done, we mean nothing less than to pray that God's ultimate, final will through Christ is done - in life and in death.