The mantra "only God knows the heart" is only true if someone does not have the Holy Spirit. Those who have the Holy Spirit can discern who is saved and who is not. Someone is only confused because our culture tells us we cannot know, but God has given us the truth to know.
Matthew 7:15-20
You Will Know Them by Their Fruits
15 “Beware of false prophets, who come to you in sheep’s clothing, but inwardly they are ravenous wolves. 16 You will know them by their fruits. Do men gather grapes from thornbushes or figs from thistles? 17 Even so, every good tree bears good fruit, but a bad tree bears bad fruit. 18 A good tree cannot bear bad fruit, nor can a bad tree bear good fruit. 19 Every tree that does not bear good fruit is cut down and thrown into the fire. 20 Therefore by their fruits you will know them."
Galatians 5:22-23
"22 But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, 23 gentleness, self-control; against such things there is no law."
This fruit is the character qualities of Christ, every believer can discern them in every other believer. When there is no Spiritual connection to someone and that someone fights against the word of God we have our answer that they do not possess the fruit of the Spirit.
When we encounter those who are friendly and kind to those who they like and mean and rude to those they don't like, while acting superior to others as a lifestyle, we know those people do not have the fruit of the Spirit.
Those who have the fruit of the Spirit do not "switch it up" depending who they are with, they are kind and possess all the fruit all of the time. If they fail at times they quickly confess and regret what they did and admit it to be cleansed. 1 John 1:9
Those who refuse to confess their sinful actions toward others, justifying rude acts and attitudes are not born again.
The modern Christianity observes regularly those who say they are Christians but have no fruit, this confuses them and removes their discernment.
1 John 4:1
"Beloved, do not believe every spirit, but test the spirits to see whether they are from God, for many false prophets have gone out into the world."
Hebrews 5:14
"But solid food is for the mature, for those who have their powers of discernment trained by constant practice to distinguish good from evil."
Born-again believers train themselves to be discerning by knowing the Word of God and by consulting the Holy Spirit for understanding. We have no excuse for not having discernment, God clearly states that He gives wisdom to whoever wants it. But He will not give it to those who love their own ideas of wisdom and do not consult Him or His Word.
James 1:5-6
"5 If any of you lacks wisdom, let him ask of God, who gives to all liberally and without reproach, and it will be given to him. 6 But let him ask in faith, with no doubting, for he who doubts is like a wave of the sea driven and tossed by the wind."
Do not be led astray becoming confused by the modern idea of Christianity, check with God and believe Him.
1 Thessalonians 5:21-22 "21 but test all things. Hold fast to what is good. 22 Abstain from every form of evil.…"