I am on the same boat. I left management to go back to a senior IC role in my early 50s. I am perceived as an important contributor in my company, but I am 90% sure that no big company would ever hire me. I am also pretty sure I cannot pass LeetCode these days even though I work on implementing scientific algorithms that actually get used by major engineering/manufacturing companies around the world.