
According to your description, I have done a test. In the document library, I set unique permissions for document and folder. Then I created a custom view and filtered "to show documents without folders" to show all document without folder. After that, I can see "Pin to top" option in each document file.
Due to document and folder with unique permissions, please make sure that you have edit permissions for the list and also have edit permissions for these files.
Try to upload a file without unique permissions, then test "Pin to top" option whether visible for this file.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.