The visible church of Christ is mixed; having both wheat and tares. It is the characteristic of God's people to persevere to the end because God preserves them (John 6:38-40, John 10:28-29, Romans 8:28-39). Those who fall away demonstrate that they had spurious faith. (See 1 John 2:19) The Holy Spirit quickens His people and since His seed abides in them He keeps them from falling away because they have been born again (1 John 3:19). He also preserves His own by disciplining us when we fail to judge ourselves, so that we won't be condemned along with the world (1 Cor 11:31-32). God also uses his word as a means of preserving us by calling us to persevere and giving us warnings of what will occur if we don't.
The warnings in scripture given in the context of the visible church are directed at both the regenerate and unregenerate, both wheat and tares, both sheep and goats. These kind of warnings serve two purposes:
1) The elect (sheep) hear his voice in the word and take heed.
2) The non-elect (goats) do not hear his voice and fall away.
In other words, the warnings serve as a means of grace (or hardening). - when the elect hear warnings in scripture it causes them to persevere. When the non-elect hear it, their heart hardens over time and they fall away completely, revealing that they have been trusting in something other than Christ alone for salvation.
"He will not forsake His saints. They are preserved forever." - Psalm 37:28
Chapter XVII. Of the Perseverance of the Saints
Section I.–They whom God hath accepted in his Beloved, effectually called and sanctified by his Spirit, can neither totally nor finally fall away from the state of grace; but shall certainly persevere therein to the end, and be eternally saved.
Section II.–This perseverance of the saints depends, not upon their own freewill, but upon the immutability of the decree of election, flowing from the free and unchangeable love of God the Father; upon the efficacy of the merit and intercession of Jesus Christ; the abiding of the Spirit and of the seed of God within them; and the nature of the covenant of grace; from all which ariseth also the certainty and infallibility thereof.
Section III.–Nevertheless they may, through the temptations of Satan and of the world, the prevalence of corruption remaining in them, and the neglect of the means of their perseverance, fall into grievous sins; and for a time continue therein: whereby they incur God's displeasure, and grieve his Holy Spirit; come to be deprived of some measure of their graces and comforts; have their hearts hardened, and their consciences wounded; hurt and scandalise others, and bring temporal judgments upon themselves.
Standing Fast or Falling Away? by Thomas Vincent
“Falling Away?” by J. Ligon Duncan
‘Don’t fall away’: the biblical theology of Hebrews by Thomas Schreiner
Can a Regenerate Christian Fall Away from the Faith?: Biblical Reflections on Hebrews 6 by John Hendryx