I haven't seen any information or thoroughly researched this idea or question. I'm not even sure it's an actual problem, but I'm wondering if certain replicated items infringe on copyright laws in the Star Trek universe?
Yes, there are Intellectual Property (IP) laws in the Federation.
In the ST:VOY episode Author Author the EMH Doctor writes a holonovel, which he submits to a publisher. The publisher steals the work. There is then a legal hearing to determine whether the Doctor has a right to control his own IP. The Doctor wins.
The publisher's legal argument is the the Doctor isn't a real person, so the IP rights do not apply. This demonstrates that the rights exist in the first place.
I don't know any source, canon or not, that describes whether copyright extends to replicator patterns, but I would expect it would.
Based on the TNG episode with the cryogenically frozen people that are thawed out, I'd be surprised if there were restrictions on replication (at least based on IP law).
Picard has to explain multiple times to one of the thawed folks who used to be rich that he is now in a post-scarcity society, and that money is a quaint idea they'd matured beyond.
Without money as a profit motivator, most of IP law doesn't make sense. There may be some sort of registry of who invented what, but without money there isn't really any reason to restrict who can replicate an item other than safety.
According to Memory Alpha there was a patented component seen in USS Discovery, and Harry Mudd made his living selling pirated technology to civilisations without paying any royalties.
In a post-scarcity world there would be no point to patents. The reason for them is that invention is a public good, meaning it costs loads to invent something (time, education, experience, equipment, etc.) but once invented costs virtually nothing to copy it, so less resources are allocated to inventing stuff than we'd like. Same with books and music - lots of time, equipment, and talent needed to produce it, virtually none to copy it. But if resources are free and unlimited, this reasoning no longer applies. Everyone can have 100% leisure time, can get as much education as they want on any subject, and can replicate any item of equipment they might need, and have advanced software that can fill in for any lack of skill or practice - the limitation then is no longer resources but interest. People only do stuff because they want to. Like people write open source free software, and offer their expertise on question and answer sites for free, because they have all their other needs supplied. The only reason to assert ownership of an idea is vanity.
Of course, in practice the Star Trek universe was in many ways clearly not post-scarcity. It would make for a boring show if it was. It's like the technology. As a science fiction fantasy, they clearly have many future technologies that can do marvellous things and solve all our present-day problems. But that just means they have to invent new more difficult problems needing even more advanced technology that they haven't yet got, to create drama and conflict. In the same way, future economics might solve many of our present-day economic problems, but the future will just invent its own even more difficult ones to be solved. And if you ever did manage to solve them all, then the problem would be boredom, like the Q Continuum. Humans are problem-solvers - we'd just go out and find more problems to solve. So despite Picard's Utopian claims, the future is always going to have scarcity-driven economics, and money, and a need for intellectual property. I'd bet six bars of gold-pressed latinum on it!
I am almost certain the Ferengi would have a lot of copyright laws however IIRC there is nothing in canon about them.
The closest we come is either the fact that you need permission to replicate certain items such as weapons although this technically has nothing to do with copyright or the Voyager episode Author, Author which does not involve the replicator but does allude to certain aspects of copyright notably a creators rights to the use of their work.
It is likely that if a form of copyright to replicated items that The Federation would own all of them since to replicate an item you would have to use their replicator and it would be simple enough to require a transfer of the copyright in order to get permission to use the replicator. This is pure speculation as again there is nothing in canon that I can recall.