Well, isn’t that a good question? Whenever you find yourself repeating a pattern that leads to a sin you don’t really want to do and that you’ve repented about before - it probably means that you haven’t actually turned away enough to surrender to God.
God has control but won’t override your free will - that’s why our surrender is so vital to the process. When we repent, He forgives us and cleanses us. When we surrender, He goes to work in us and around us for our good and the good of others.
“Trust in the Lord with all your heart, And lean not on your own understanding; In all your ways acknowledge Him, And He shall direct your paths.” Proverbs 3:5-6