How do I prevent duplicate materials when copy-pasting?
Copy-pasting is a operating system level tool provided as a convenience for quickly transferring data between different environments, not something you would regularly use inside an application as part of its native workflow.
It should be used carefully and exclusively when required between different files, rarely within the same file.
It can lead to all sorts of issues, some of which you already encountered, like material duplication, losing datablock sharing, breaking child/parent relationships, among others.
If you are duplicating objects within a scene the correct workflow is to use Blender builtin operators, like object duplication with ⇧ Shift +  D, object cloning with Alt +  D and linking with Ctrl +  L.
Between different files, the recommended workflow is to either use linking or appending.