The London Confession of Baptist Faith, Chapter XXVI Of the Church:
I. The catholic or universal church, which (with respect to the internal work of the Spirit and truth of grace) may be called invisible, consists of the whole number of the elect that have been, are, or shall be gathered into one, under Christ, the head thereof; and is the spouse, the body, the fulness of Him that filleth all in all.
II. All persons throughout the world, professing the faith of the gospel, and obedience unto God by Christ according unto it, not destroying their own profession by any error everting the foundation, or unholiness of conversation, are and may be called visible saints; and of such ought all particular congregations to be constituted.
It's right there, in the LBC. Underlines, italics and bold, my emphasis. And here in
The Second Helvetic Confession - Chapter XVII Of the Catholic and Holy Church of God, and of The One Only Head of The Church:
Not All Who Are in the Church Are of the Church. Again, not all that are reckoned in the number of the Church are saints, and living and true members of the Church. For there are many hypocrites, who outwardly hear the Word of God, and publicly receive the sacraments, and seem to pray to God through Christ alone, to confess Christ to be their only righteousness, and to worship God, and to exercise the duties of charity, and for a time to endure with patience in misfortune. And yet they are inwardly destitute of true illumination of the Spirit, of faith and sincerity of heart, and of perseverance to the end. But eventually the character of these men, for the most part, will be disclosed. For the apostle John says; They went out from us, but they were not of us; for if they had been of us, they would indeed have continued with us (I John 2:19).