That's a good point. The same content exists on multiple instances.
I think Lemmy should set a canonical URL the HTML <head>. The canonical URL of each post should point to the instance where a post originates from.
Seems like that is not implemented in Lemmy. Also checked Mastodon, and doesn't have a canonical tag either.
On browser, I see a little fediversee icon next to every post/comment that links to the canonical. I don't think traditional html search engines know how to index it, though. Probably better if we have our own lemmy search engine like browse.feddit.de