In Reformed Dogmatics IV.1.4 page 266-267, Herman Bavinck chronicles many Scriptural passages where Christians are warned and threatened against falling away, and are called to persevere in Christ, his word, and his love. He then argues that these threats, rather than evidence that the perseverance of the saints is not guaranteed and secure, are instead used by God to motivate the willing perseverence of the believer: a perseverence that he has guaranteed in our regeneration and is not undermined by these threats.
Herman Bavinck on why God threatens and admonishes believers if perseverance of the saints is true:
Among the Reformed the doctrine of perseverance was very different [than that of the “Roman Catholics, Socinians, Remonstrants, Mennonites, Quakers, Methodists... and even Lutherans” and even Augustine].
[Perseverence] is a gift of God. He watches over it and sees to it that the work of grace is continued and completed. He does not, however, do this apart from believers but through them. In regeneration and faith, he grants a grace that as such bears an inamissible character; he grants a life that is by nature eternal; he bestows the benefits of calling, justification, and glorification that are mutually and unbreakably interconnected.
All of the above-mentioned admonitions and threats that Scripture addresses to believers, therefore, do not prove a thing against the doctrine of perseverance. They are rather the way in which God himself confirms his promise and gift through believers. They are the means by which perseverance in life is realized.
After all, perseverance is also not coercive but, as a gift of God, impacts humans in a spiritual manner. It is precisely God's will, by admonition and warning, morally to lead believers to heavenly blessedness and by the grace of the Holy Spirit to prompt them willingly to persevere in faith and love. It is therefore completely mistaken to reason from the admonitions of Holy Scripture to the possibilty of a total loss of grace.