After a couple years of work, your day job becomes the primary point of conversation.
I write resumes. For clients that are coming out of school, the project section is often a large portion of the document. For people with a few years of experience, the project section tends to slip down the resume towards the end, and eventually falls off entirely. Experienced professionals with a projects section are usually trying to demonstrate skills they developed outside their day job (e.g. if you want to be a data scientist but are a web dev by day, some data science projects you did while taking a Coursera course will be useful to list).
All that being said, the problem you are describing is real for people who enjoy doing open source work and are employed by companies with restrictions on ownership. When I was a recruiter, I did work with some client companies to alter contractual language for new hires that had a body of open source work.