I've been at the same corporation for 13 years now and have encountered this a couple times. I don't know how feasible it is where you work, but what I've done is look for a new position within the company. I really love this company, but there have been times I didn't enjoy the work/team I was on.
It could be as simple as changing to a new project, or sometimes even more extreme. I went from being a lead architect on a project to heading over to the DevOps team for a year and giving that a try. I didn't enjoy it so I've since moved over to our Data Science team where I'm an Analytics Architect. Luckily I've been here long enough and gotten to know enough people that they've come and let me know when they have openings on their team and see if I'm interested.
TLDR; See if you can find another team/division within your company to work for.
TLDR; See if you can find another team/division within your company to work for.