The Word of God is powerful, able to separate soul and spirit. With Christians the spirit is separated from the fleshly nature inherited from Adam, and 1 John 3:9 tells us GOD then abides in that nerwborn spirit, and His level if life He brings to the human spirit is eternal life. The behavior mechanism may and does continue to sin because the Righteousness of Cjhrist is not in the human soul it is in the human spirit, a spirit which was separated from the soul of the flesh when that Christian member was born again, born from above.
Just so its clear, the ten commandments describe the nature of GOD, so when God in the Holy Spirit is ABIDING in the human spirit the nature of God in His Righteousness is abiding in the newborn Christian member.