Spending many hours on doing software development does, in fact, make you better at software development than someone who, ceteris paribus, spent that same time playing video games. I feel that "not necessarily" is becoming the 21st century version of "but there's still a chance, right?"
Plus if you have been doing it for 10 years+ how much more are you going to improve really by coding more hours?
The field is so wide that you could be doing it for 100 years and still keep learning new things that would improve your work.
And for senior+ levels, where soft skills start to dominate, you still need to have already become competent at the hard things. Soft skills are means for making things happen, but you have to have a clue which things need to happen, and which don't.
It isn’t rocket science really, learn the fundamental well, keep practicing 40h a week for years and you will master the craft.
The difference between two masters of the craft won’t be the person who sit more hours on the chair in front of the computer.
Skill doesn't come from nowhere. It comes from practicing it and thinking about it and otherwise being mentally engaged with the field.
And yeah, I'm pretty sure that after 100 years of cooking, and learning how to cook, I'd be better than the person who put in only 20, just by sheer virtue of more internalized knowledge, more time to think, and more practice.
Each person brings an unique set of skills based on their experience (professional and life).
I have worked in lots of different industries from designing hardware chips with VHDL to multi datacenter kubernetes deployment with 100k of cores.
I never did side projects neither did I expect more time on the chair from a coworker... Still somehow I can build winning teams with all the different mixes and industries.
By that logic the oldest developers should be the best of all. But that is not true. Some are great, some are average and some are still bad even after a life time of practice.