How do I stick to protocol once and for all?


Circumstance: Since September 2021 I was on and off protocol. Losing a couple of pounds, regaining them and some more.
Thought: Gosh, I am at a worse starting point than 7 months ago. (I could have been at my goal)
Feeling: Desperate
Action: Starting protocol again, but only being able to stay on it for a day or two until some “event, invitation” or carby food touches my brain.
Result: Zero progress towards my goal

How do I find strong resolve and really stick to protocol? I feel like I will never be able to succeed. This has been going on in the exact same fashion for 15 years.