With the recent advertisement by UPSC ( https://upsc.gov.in/sites/default/files/Advt-No-51-2021-Engl.pdf) for lateral recruitment of specialists in Government of India (3 Joint Secretary and 37 Director level pots), the conversations around generalists v specialists have got revived.
However, it is a lazy fallacy to think in binary terms. Private sector see has been using the concept of T-shaped skills for a long time now, joining the depth of related skills and expertise in a single field, with ability to collaborate and apply knowledge in other areas.
Most people would have heard of the 10,000-hour rule (popularized by Malcolm Gladwell in Outliers) to gain mastery in a subject. Those 10K hours correspond to 10 years of productive life of a professional.
However, it is not merely practice but deliberate practice, involving moving out of the comfort zone and seeking specific feedback, that leads to constant improvement. More in this episode @Freakonomics https://freakonomics.com/podcast/peak/
A generalist can not spend that kind of time in one area; and the exaltation he has already received early in the career (for cracking an exam!) will keep him away from knowledge and closer to power, limiting learning opportunities.