The word “if” tells me this doesn’t have to happen. The word “regard” distinguishes between sin that is occasional and sin that is hidden and ongoing. Sin that is allowed to come in and remain will destroy a person’s prayer life. A praying man will stop sinning. A sinning man will stop praying.
What’s the answer? Confession! Genuine, heartfelt confession is like spiritual drano! It cleanses the heart and reopens the lines of communication with God. So learn the prayer of David in Psalm 19:12, “Cleanse me from secret faults.” Then you can pray with confidence knowing that God will hear and answer.