I may not be the best person to give advice here about sticking to diet, but I have some ideas I do that generally work well for me, but only for a period of time.
One issue I had was eating at night from 8pm to 10pm. I was perfect the rest of the day, pre-made meals, calories / macros counted exactly. Then, from 8-10, I ruined all of that. This compares to you, making your meals ahead of time, but being around food all day, you eat other, non planned items.
Plan to cheat. If you know you will eat 600 calories of extra stuff, then make 600 calories less. I personally do 6 meals at 600 calories / 50g protein a day, that is a cut for me (i'm a fatass and it takes 4000 calories for maintenance). for me, I would eat one less meal, or, make my meals 500 calories each. I do this, works great for a while, but for me personally, I get bored of my pre-made food and end up eating the wrong stuff at night instead.
Try that maybe, the plan to cheat method, but just keep the cheat still healthy food. My cheat was healthy, nuts, fruit, etc, it just ended up defeating the counted calories.
Another trigger for me is sitting on the upstairs couch while watching TV with the wife. I combat that by either playing video games downstairs in the theater room, watching a movie down there, or watching TV in bed. I don't eat in those places, but I do on the couch upstairs. Point being is the couch is a trigger to mindlessly eat. For you, I'm not sure what the trigger is, but if you can identify it, then remove that from the equation. It only takes me 2 weeks of avoiding the couch to change my cravings. After 2 weeks, I can go back there and sit like normal