That's one of the greatest corporate flaws and my biggest personal failure that I fail, and refuse, to adapt to.
When I work in a team I often try to empower lacking teammates by taking a challanging task, do most of the hard work, and give it to somebody else to finish up the easy part and ship the solution. While working on it they have to understand how the solution actually works (for instance by writing tests), and usually they are happy that they can contribute something bigger than they normally could. I don't mind passing the credit, as long as I know that the person actually made some work and understand the code. Meanwhile I offer myself for help or pair programming (although I'm not really a fan of the concept per se) to kickstart someone elses tasks, helping with architecture or just the general approach to the problem.
My coworkes like me, it worked wonders when I was running my own company, yet, when working in BigCo I have to constantly explain myself to higher ups that I'm actually present, not slacking and doing my job, because my jira/github profile doesn't shine.
One could say I'm a fool by not building up "portfolio" and paving my way to promotion/raise, but I genuinely think that this brings much bigger value in a long run. :)