Righteousness determines how God treats you. There are two kinds of righteousness, the kind that Jesus gives and the kind that religion thinks it can earn or be disqualified for through keeping and breaking laws or commandments.
Religion can become addictive. Religion for the purposes of this article is man’s attempts to be accepted by God based on deeds or rules. It feels good to do the right thing and it feels bad, for normal people, to do the wrong thing. But to think God is changing how he relates to us based on our behavior is a toxic view of God and it invalidates the right-standing with God that Jesus died for. To believe that God withholds blessing, wisdom or love based on behavior is a toxic doctrine of religion that ends up driving people away from God.