Bug: Pinned File disappears in Teams after pinning
Once a file has been pinned in a channel, if you leave the Files tab and return it no longer displays. It does, however display as pinned in SharePoint
Jareb Coupe commented
I wonder if this is related to the fact that you can't pin Teams / SharePoint / OneDrive files to your regular task bar either.
I mean, you can drag a file from a sync'd OneDrive folder ONTO your task bar, and choose to pin it. But the next time you restart, those pinned items will be gone.