I worked at the same company for almost exactly 12 years, I was so burned out that I didn't just leave to a similar role, I changed fields. After a year and a half I was nearly broke and went back to my abusive ex, despite a healthy pay bump I left again after a year and haven't done anything tech related since.
Not all departures are due to bad things. Sometimes you want to pursue a different area of focus and your current company doesn't have an opening like that. But maybe a few years later they do.
There are many scenarios to leave a company - in yours you were denied an avenue for self development and if the company has done that once they'll do it again.
Not all companies are good. If one is shitty enough for you to abandon the relationships you built there it isn't worth going back to.
I left a company after 5 years because (in retrospect) I was starting to feel burned out about product engineering. I left for another product engineering job, thinking that my problem was with the product culture at my old place. Nope! Hated product work at the new place too.
Eventually a role opened up at the old place, working on a more dev-ops-y side, and I gave it a shot. It worked out well for 2 years, but after a re-organization cut back the scope of my work, I left for somewhere else.