I agree with the problem but not the solution. Yes, paying people to get changes merged is an attack on projects. I've seen this first hand where all of a sudden random BS PRs emerged. But ... "Open Source" is a license thing which requires public source. Closed source is the absence of an OSI approved "open source" license and does not mean that the source is not public. Open source projects normally cannot simply change their license as all contributors would have to be asked or you would have to remove all their contributions (or they were planning for this from the start and had all contributors sign a dual licensing form which gave usually a company the right to use the contribution in closed source, too. If in my project something like this would happen, as a maintainer I would employ bots to throttle contributions. First time contributions to non-code files could get auto-closed with an appology comment.
You're correct, and I don't mean open source in its entirety. In fact, I believe best way for someone to learn coding is likely by building their own open source projects. The issue arises when new developers aim to contribute to well-established projects solely for resume enhancement or "to get started", turning it into a rat race. Some YouTube influencers are also blamed for this; this recent issue arose due to one irresponsible YouTuber. While it can be a valid learning path, there's a right approach. And also It was an easy fix for GitHub, but I don't really have a lot of hope; they are busy selling Copilot.