Hi it depends on few factors if you can answer
1.Whether the document had never been shared publicly, or if it was at some point before being restricted.
2.Whether LinkedIn showed only the title and a thumbnail, or any part of the document content.
3.Whether your friend is part of a Google Workspace domain (e.g., company/org), or a regular Gmail user.
apparently the document was briefly public.