When we go to confession, the Church asks that we have a firm resolve not to sin again. Often though, we find ourselves in the situation you’ve described - we know that, if tempted again, we will most likely succumb in pretty much the same way as we did before despite our best desires not to - as St Paul so beautifully puts it: “I do not do thing I want to do instead I do the thing I don’t want to do”. That doesn’t mean though that you don’t have firm resolve not to sin again nor does it come anywhere close to affecting the validity of the sacrament. Remember, the sacraments were made for us, not us for the sacraments; in other words, God doesn’t expect of us more than we capable of doing but does help us through the grace of the sacrament which builds on our flawed human nature. Each time that you sin - especially in the same way - as often as it happens, keep going back to confession, keep seeking God’s gift of grace to help you and strengthen you in your struggles. It doesn’t matter if your there every week - or even more often than that - thanks be to God for a sinner who know their need of God’s mercy and for His help.