I'm in that boat. Lost most of my weight from 2018-2020 and for the first time ever was comfortable in my own skin. Then the pandemic happened, and I spiralled mentally from the isolation and just increased anxiety during those years and I started overeating, stress-eating, and just stopped counting calories. I regained almost 20kg of the 40kg I lost. I tried to get back on the horse multiple times over the past year but it feels like a switch in my mind has been permanently flipped.
"What's the point?", I ask myself. "I lose it all once and gained it all back at the flip of a dime? Who's to say the same thing won't happen again?". Pair this unhealthy mindset with a string of shitty jobs which caused me to stress eat to cope and it's not gotten any better.
I think mentally, I'm still scared from the last 3 years and it's seriously hampering my ability to stick to my healthy habits like I once did, and it becomes a self-fulfilling prophecy. Unfortunately, I don't have the funds to seek professional help to fix my broken mind so I just keep trying and failing to lose the weight with whatever bursts of motivation I get. Lately I've started to walk 10k steps a day and while it's not helping me lose any weight, it's at least helping me create a healthy outlet for my anxiety instead of binge eating so I guess that's good.
I know exactly how you feel, and I wish I could give you some advice on getting back on the horse, but I feel like I'm the last person who should be giving out any advice on that.