Been there and back a number of times, for a number of reasons.
For me morning sickness has been the biggest derailer, if buttered bread is all I can keep down for a few days, buttered bread is all I'm gonna eat for a few days. Pregnancy hormones also seem to minimize my response to foods I would otherwise have issues with, so the pain isn't there to guide me back on track as quickly.
I think making a lifelong commitment to eating differently requires the freedom to go back and forth until you can really prove to yourself that you do indeed feel better eating better. It is a conditioning process, and if you have doubts left in the back of your mind, the process isn't complete, and the change won't stick.
No one masters a new task in a day or a week, to get good at meal planning, and developing the self awareness to eat mindfully takes time to become habit. I know I'm solid when I get to a point where things that I don't think I should eat don't even like like food to me anymore. If a bag of chips looks about as appealing as a shoe, you're home free.
If you find that you are cheating or snacking out of hunger or more than you think you should on purely experimental grounds, the "crowd out the crap" method can help keep you fortified and less susceptible to slip-ups. My way of doing that is to eat as much meat as I can at breakfast, and distractions from food like substances lose their siren song because I'm so full.