Lots of posts here, and I didn't see this (but didn't read them all). My "one weird trick" to losing weight: I didn't make weight loss, itself, a goal.

I spent my 20s being unfit and overweight (periodically pushing into obese). In my late 20s I started playing soccer (two seasons a year), but did not train or exercise beyond the games. At the beginning of the season I'd be gassed in 5 minutes, by the end I might have been able to stay in for an entire half. So I established a fitness goal (run a 5km in < 30 minutes, consistently) in order to be fit enough to participate in soccer. I did not track my weight during this time, I just tracked my fitness level (basically running performance + heart rate measured ~5 times a day: on waking, before run, after run, about five minutes after the run, before bed). I happened to lose weight, because you almost can't help it when you go from being sedentary to running 3-5 times a week (which started as walking, not as running).

I didn't, initially, make any dietary changes other than cutting out sodas (which were a daily habit at that point), switched to coffee (about two espressos a day in the office break room, we made a coffee club) for my caffeine source. As I got into running (versus the initial walking) I started adding more fruit and nuts as snacks, because I was getting hungrier and found myself craving them (versus a candy bar, like might have been my snake previously), they were not a deliberate choice (that is, I didn't say today I switch to fruits and nuts, I just started craving them, and I didn't deliberately drop candy bars, I just stopped wanting them). Again, the goal was not weight loss, I wasn't measuring my weight at all and only learned my weight at my annual (or 6-month, I had very high cholesterol at that point) physicals.

I think the above is important, I had, in my 20s, made a few efforts at weight loss where weight loss was the goal. The problem was that once I hit it, I lost track of what I'd done to achieve it and the weight would come back. By having some longterm objective (being "fit", which for me meant being able to play 70 minutes of soccer without needing more than the half-time break) I was able to make sustainable habits. I have had my weight go up a couple times, but it's been because of things like injuries (car accidents, in my case) that took me out of my training routine. When I reestablish some fitness goals, I find that the habits that encourage weight loss (or maintaining a healthy weight) come right back with them.

Another aspect of this is that I wasn't training for a thing or event. I did that, actually, with a half-marathon. But it was because I was already getting fast and improved my endurance so I thought, "Why not try for this?" and I did. But as soon as it was done my running routine went back down to 5km 3-4 times a week with an occasional 7-10km run versus the 3-4x 7-10km runs a week. Why? Because that was enough for my overall goal (being fit for soccer), above that was unnecessary and I found it hard to maintain a higher training level when I didn't have a motivation for it. Training for an event is like dieting to hit a weight target, once it's hit it is harder to maintain the training regimen or the diet. So create longer term goals that encourage sustainable habits.