If you learn the right stuff this is not the case. Knowledge in the areas of algorithms, data structures, code and language design seems to have a certain timelessness to it.
I’ve always considered it sub-optimal to become an expert in all the idiosyncrasies of one particular language or domain at the expense of thinking about and trying to understand the larger truths and principles of software development. Idiosyncrasies can be easily referenced; a good grasp of abstract principles takes practice.