I always found it means it’s time to move on to something I enjoy again. I have a good track record of solving stuff other people don’t like (I, for instance, like projects with millions of lines of terrible code that no one knows how to fix/add on to) and I have a good track record for rapidly doing a tech startup. MVPs I have done in a weekend and had the startups I did it for raise millions. But what I personally hate is an actual business… I like the seed stage, the bustle, the sleeping under the desk to push it out. When it starts to make real money I get bored and depressed; when I enter the 40th meeting about some drop shadow of a button or when we ‘need to’ discuss trivial new functionality for days with 10+ people. When every day becomes working down the same task lists and processes are hardened so all code looks the same because standards (usually 1000x more work to write than just hacking it). I accepted this but when I like a place, I still sometimes (last time was 2020) fall in the trap that I stay too long. And then I start to feel useless, I don't want to work on some feature for weeks that most people won’t notice etc. It feels pointless and then I feel like you describe.
I fixed it so far every time by moving to another country and going into (one or more) startups. Currently I am in 4 startups; I like two of them a bit too much so hope I will be strong enough to get out soon.