Jn 15:2 "Every branch in me that beareth not fruit he taketh away:.."
These branches were in Christ, not falsely claiming to be in Christ but actually in Christ. Cannot be severed/taken away from the vine if never really attached to the vine.
A branch that bears NO fruit is a DEAD branch. To be "in Christ" under the New Covenant is to be a Christian (2 Corinthians 5:17). To be a dead branch self-attached to the vine, like Judas Iscariot is to not be a Christian. Though Judas was externally attached to the vine, he did not bear fruit or abide in Christ because he was an unbelieving, unclean devil who would betray Jesus (John 6:64-71) unlike the remaining 11 disciples (John 13:10,11). Those who profess to know Christ but whose relationship to Him is self-attached, He neither elected them, nor saved them, nor sustains them. Eventually, the fruitless branches are identified as not belonging to the vine and are removed.
Jesus mentions branches that bear fruit and branches that bear no fruit (vs. 2) but Jesus says nothing about branches that bear fruit but then stopped bearing fruit. When Jesus spoke these words, how many people at that time, prior to Him being glorified (John 7:38,39) had received the Holy Spirit and were baptized by one Spirit into one body? "the body of Christ" (1 Corinthians 12:13) So "in me" is part of the metaphor of the vine, (in the vine) not in the body of Christ under the New Covenant which was not yet fully established. So in John 15, we see two kinds of connections with Christ as the vine (the merely cosmic which bears no fruit, (like Judas) and the vital which bears fruit - like the remaining 11 disciples).