On infants who are baptized and die in infancy, the Synod of Dort (1619) and the 1662 Book of Common Prayer are agreed: there is no reason to doubt, and every reason to believe on the basis of God’s word, that God has chosen them to be saved.
The Canons of Dort confidently explain,
Since we are to judge of the will of God from his word (which testifies that the children of believers are holy, not by nature, but in virtue of the covenant of grace, in which they, together with the parents, are comprehended), godly parents have no reason to doubt of the election and salvation of their children whom it pleaseth God to call out of this life in their infancy.Canons of Dort 1.17.
The Book of Common Prayer says likewise,
It is certain, by God’s word, that children which are baptized, dying before they commit actual sin, are undoubtedly saved.Publick Baptism of Infants, Book of Common Prayer (1662).
Whether or not you agree with John Davenant (who was influential at the Synod of Dort) that this is because baptism remits the guilt of original sin from infants, the Prayer Book states the general doctrine that baptized children dying in infancy are undoubtedly saved. This is not to deny that God may save – that the Spirit may regenerate – some or even all of those who die in infancy unbaptized: on such infants, whose cases God’s word does not make certain, Dort and the Prayer Book are respectfully silent. Neither is this claim of both the Synod of Dort and the English Prayer Book denied by the Westminster Confession of Faith (1646), which says elect infants are saved by Christ through the Spirit:
Elect infants, dying in infancy, are regenerated, and saved by Christ, through the Spirit, who worketh when, and where, and how he pleaseth: so also are all other elect persons who are uncapable of being outwardly called by the ministry of the Word.WCF 10.3.
That all baptized infants dying in infancy are counted among this elect of God is reasonable to suppose, and expressly taught by the Synod of Dort; who else is elect is unknown. The Westminster Confession’s intent here seems to be to extend its affirmation of the regeneration of others who are elect but cannot possibly be outwardly called to salvation by the ministry of the word. Let the Reformed therefore not suppose that, on baptism, the Book of Common Prayer teaches anything contrary to Reformed orthodoxy. The teaching that baptized infants are (in their own manner) saved may seem strange to some, but it has the warrant of Scripture and is the common understanding of the Reformed.