> Open source would be ruined if everyone believed that copying smart code without recognizing the authors is ethical.
Open source would be ruined if it were easier to build upon past works with lower barriers to research and licensing?
> Would this kind of copying be fine in software and not in other scientific papers or other industrial processes?
Scientific papers are more about collecting and experimenting with novel data- and referencing an explicit paper trail of past results. It's not really comparable. Fiction is a better match.
> Would it be fine if I train copilot on a patent database and start creating new patents (at a rate in which is would be unpractical to determine that it is regurgitating prior art)?
This is a problem with the patent system, not copilot, and is also isn't a capability that copilot actually has. You're describing a different system entirely.