Hey!

You're learning as you go! One thing you've learned is that "sometimes" going to the gym isn't enough. And, being on a plan for a short term also isn't enough.

Sad, but true!
No one is holding you down and forcing that food into your mouth. No one can stop you from eating those foods, either! Unless you want someone to follow you around and wrestle them out of your hands...
No one picks up the car keys and drives you to the nearest fast food, corner store, etc. "Just happens" doesn't cut it! Nothing "just happens."
So, given that, as the previous poster said, you need to plan plan plan, and you need to make some rules for yourself that can get you past your addictive behavior. Rules like:
- Eating only the foods on plan.
- Not keeping any "trigger foods" in the house (potato chips, candy, whatever they are).
- Not driving in search of "bad" foods to eat.
- Not eating alone in the car.
The time may come when you don't have to be so strict with yourself, but from what you've said, that time is not now.
As Meg once said, "If you want it, you'll find a way. If you don't, you'll find an excuse." Which will it be? Do you want to lose more weight, or not? Do you want to maintain your weight, or not?
Don't give up trying!
Jay