Yes, our sin hinders our relationship with God, but we shouldn’t despair - we shouldn't feel hopeless. In the beginning of Jonah 2:4, we learn that Jonah feels as if he has been…
“‘…driven away from [God’s] sight;’”(Jon 2:4a)
The word Jonah uses for "driven" carries the idea of being forced out, to be forced away from. It’s what I do to our dog when he comes in the kitchen while I’m preparing food. I drive him out of the kitchen back to his bed.
As Jonah is sinking down to his watery grave, Jonah felt as if he was forced out of God’s sight. But even though Jonah felt that way, he didn’t despair. In the remainder of verse 4, he says,
“yet I shall again look upon your holy temple.’”(Jon 2:4b)
The reason Jonah didn't despair, the reason Jonah wasn’t hopeless, even though he felt like he had been driven from the Lord, was because he knew the Lord was a God of loyal love. Because God is a God of loyal love, we can turn back to the Lord through repentance.
The same is true for us. While our sin hinders our relationship with God, we can always turn to Him because He is a God of loyal love. You haven’t messed up so big that you are driven from God’s sight forever. You can repair your relationship by repenting. That's exactly what we should do when we discover we have sinned against God.
We should repent, turning back to the Lord even though we might feel as if we have been driven from God’s presence because God loves us and wants what's best for us.