I would say that your issue is not to do with generalist vs specialist, its more to do with where you are in your career and how much you contribute. Once you are above a VP level you are no longer a good candidate if your resume lists "proficient in react" as a skill. Its more important to showcase what company level changes are you able to drive. For example your CV should have achievements like - grew the team from size x to y, end to end ownership of a key feature of the product that was able to drive sales by x%, etc.
On these lines generalists "generally" win. I find that when people talk about generealists vs specialists they focus more on number of things they can do. But its more important how you define the skill. You knowing and correctly identifying the data set for marketing team is way more valuable than actually being responsible for querying and putting the data together. Personally I try to spend more time on defining my tasks clearly, so that I can maximise my impact on the organisation. Hopefully this framework is of some help and you can relate to it. All the best friend!