A lot of people think they can lose their salvation, that their salvation is based on how good they can keep their own lives. This is not the gospel.
Jesus Christ required only two things to be born-again, that is to confess we are sinners and then to believe Him when He said He paid for our sin all we have to do it trust in Him.
Acts 3:19
Jesus Christ changes us, we do not change ourselves.
Christ comes to live in us, we are sealed with the Holy Spirit of Promise as a Guarantee of our Salvation. All we do is believe Him, confess and begin to trust in Him, He does everything else. He changes us into an entirely new person. The old person is gone, we no longer think the same way we did before.
2 Corinthians 5:17
"17 Therefore if anyone is in Christ, this person is a new [a]creation; the old things passed away; behold, new things have come."
Ephesians 1:13-14
"13 In Him, you also, after listening to the message of truth, the gospel of your salvation—having also believed, you were sealed in Him with the Holy Spirit of the promise, 14 who is the first installment of our inheritance, in regard to the redemption of God’s own possession, to the praise of His glory."
The Holy Spirit does not hop in and out of us because we have sinned. God disciplines those who belong to Him, He does not throw them away.
Hebrews 12:5-7 "…5 And you have forgotten the exhortation that addresses you as sons: “My son, do not take lightly the discipline of the Lord, and do not lose heart when He rebukes you. 6 For the Lord disciplines the one He loves, and He chastises every son He receives.” 7 Endure suffering as discipline; God is treating you as sons. For what son is not disciplined by his father?…"
If you are trusting in yourself to remain saved then you have not trusted in Christ Who paid the penalty for our sin.
Don't let anyone deceive you that you must be good enough in your own strength and power. This thinking causes many false converts to become proud of themselves and many walk away because they cannot keep up the pretense of being good.
No one is good, only Christ is good. When we mess up as His children we eventually confess that sin and are cleansed from it. God knows we have no ability to keep ourselves cleansed, Christ in us is continually cleansing us and growing us in holiness. Depend on Him.
We do sin but we don't keep on sinning.
1 John 3:8-10 "…8 The one who practices sin is of the devil, because the devil has been sinning from the very start. This is why the Son of God was revealed, to destroy the works of the devil. 9 Anyone born of God refuses to practice sin, because God’s seed abides in him; he cannot go on sinning, because he has been born of God. 10 By this the children of God are distinguished from the children of the devil: Anyone who does not practice righteousness is not of God, nor is anyone who does not love his brother."
Anyone who claims to be a Christian and fights to defend that sin, have never been born again, they are pretenders.
Those who sin and are ashamed of it, confess it and turn to Christ to be cleansed are born of God. These are His children.