I think the problem is the word "free" in open source. Along the axis of freedom, this is a strength. You can read the source, figure out how it works, and adapt it to your uses. Or, as my senpai (pity English doesn't have a single word for "talented co-worker that demonstrates the ideas you haven't thought of yet) puts it, "I can read the source for a feature I like, and then I know how to do it, and I can avoid the features I do not want." This isn't copying, this is studying. You read the source to understand, then write your own implementation that better fits your use case.
However, there is another axis to consider: In English, "free" also means gratis. This means that no one with recognized authority is enforcing a shift of resources in exchange for using the code as written. Yes, you can ask for resources, and there are many ways to do so, but without enforcement, you get the most common behavior of "thank you, I will" and all the attendant problems, be that of pushing the license to limits, finding loopholes, to lack of funding, dead projects, to (possibly) self-interested actors placing features in open source that they can later exploit because no one really audits the code (See also log4j. I am not saying that a government placed something exploitable in the code. I am not saying that a private actor did so. I am saying it is interesting that a piece of widely used infrastructure has had an exploitable feature for so long).
Criticism aside, how does one provide freedom to learn and explore while curtailing the free rider problem?
A first-generation solution: Sell copies of your source code for the resources you need to maintain it. One example would be to make the source available once money has changed hands. You cannot stop the buyer from turning around and giving the source away for free: Once you have made a sale, you have made a sale. That particular copy of your source has created all the profit it will create.
A second-generation solution: Sell future updates. This is an idea I have been playing with, in terms of a business plan. Your source is free (both gratis and freedom) and you sell tokens. The tokens are capable of being purchased separately. Tokens can be exchanged for votes to determine which new features are developed and which bugs are fixed. They key is in selling the tokens.