I've seen this claim recently and it's rubbish.
Yes, if by "nothing" we mean writing next to no code, because they're busy either:
- architecting software solutions, as they're knowledgeable enough that they should be doing this instead of writing code
- understanding a lot of what is going on in components and/or the system so that when there's an issue they say "oh, this is likely because of X" and the resolution takes days instead of weeks.
I.e. yes, there is a percentage of developers who we pile other tasks on and they don't get to write code.
My experience is that the more knowledgeable developers get, the less code they write.
Then neurodivergent peeps are different - an Autistic dev might be super knowledgeable and happy writing unit tests because they don't enjoy the uncertainty of large problems, or an ADHD developer might have a large system-wide view but write what seem like small contributions.