There is always this perennial argument whether believers are really saved initially but lose their salvation when they fall away later; or they are NOT really saved at all in the first place when they fall away and leave completely later. Let us take a look at the following two Scriptural passages closely.
Now when He was in Jerusalem at the Passover, during the feast, many believed in His name as they observed His signs which He was doing. But Jesus, on His part, was not entrusting Himself to them, because He knew all people, and because He did not need anyone to testify about mankind, for He Himself knew what was in mankind.
1 John 2:19
They went out from us, but they were NOT REALLY of us; for if they had been of us, they would have remained with us, but they went out so that it would be EVIDENT that they all are not of us.
So then many of His disciples, when they heard this, said, “This statement is very unpleasant; who can listen to it?” But Jesus, aware that His disciples were complaining about this, said to them, “Is this offensive to you? What then if you see the Son of Man ascending to where He was before? It is the Spirit who gives life; the flesh provides no benefit; the words that I have spoken to you are spirit, and are life. But there are some of you who do not believe.” For Jesus knew from the beginning who they were who did not believe, and who it was who would betray Him. And He was saying, “For this reason I have told you that no one can come to Me unless it has been granted him from the Father.” As a result of this many of His disciples left, and would no longer walk with Him.
In John 2:23-25, Scripture said that many believed in His name but Jesus our Lord did not entrust Himself to them. In other words, He did not believe their faith. So did these people believe in His name initially ? Were their faith illegitimate from the start which was why Jesus our Lord said He could not trust their faith ? 1 John 2:19 also seemed to affirm that the faith of those who departed were illegitimate in the first place.
Later in John 6:64-65, Scripture said that Jesus our Lord knew from the BEGINNING who did not believe. In John 6:66, Scripture said clearly these believers, who were His DISCIPLES, left and no longer walked with Him. Were these believers DISCIPLES from the beginning but later fell away ?
Reading the passages of John 2:23-25 and John 6:60-66, one can interpret that the believers can lose their salvation when they fall away for Scripture mentioned that they believed in the name of Jesus and were disciples. Another can interpret otherwise that they were not believers in the first place because Jesus our Lord did not trust their faith and He knew from the beginning those who did not believe even though they followed Him for some time.
The parable of the sower gave 4 different heart responses to the gospel. Can the rocky ground and the ground with weeds be transformed to the good soil ? Or the condition of the heart already settles the receptivity to the gospel even though they may receive the gospel with joy initially. Luke 8:13.
I believe a better question to ask, which we can have a definite answer from Scripture, is to ask how we can know if we have eternal life in Christ. Scripture does give us an answer to examine our faith.
1 John 5:13
These things I have written to you who believe in the name of the Son of God, so that you may know that you have eternal life.
The apostle John said in 1 John 5:13 that he had written all these things in his epistle so that we may know we have eternal life. So what are these things written in 1 John ? https://www.gotquestions.org/signs-saving-faith.html
Scripture also gives us the the right repentance leading to legitimate faith in 2 Cor 7:9-11. http://www.jcmanifesto.org/?s=godly+sorrow
Only with legitimate faith can one be born again with the new heart and new spirit. So can it be that some believers do not have the new heart and new spirit given by the Lord when they first believed apparently ? Perhaps these believers do not count their cost of discipleship or have the wrong repentance leading to faith in the first place which render their faith to be illegitimate all along. Zacchaeus decided there and then on the cost of following Jesus by taking appropriate action upon having the right repentance leading to faith; while the rich young ruler decided the cost was too high and walked away. Even if the young ruler decided to follow Jesus without the repentance shown by Zacchaeus, his faith would be illegitimate.