I don't use a Shared Library, so I may be off the track here, but my understanding is that a picture is in either the personal or in the shared Library, not both, although you can choose to view both Libraries together. Is that not right? I'm not understanding "They were in both libraries."
If a date accidentally changed, or a title, then the pictures may not be where you expect. Can you search for the file name or for the content of the picture? And remember, you can sort the Library by date captured or by date added or by title. Also, your Library view now has filters, and you may not have your filter set to "All Items.” Be sure to look in Utilities>Recently Saved.
A few more questions:
- Were your picture in an album?
- Have you looked for your missing pictures at iCloud.com?
- Do you have “Optimize Storage” checked in Photos’ Settings
- Have you checked to see if the Apple Account is really really the same on the Mac and at iCloud.com?
- What is your storage at iCloud.com? At System Settings>[name]>iCloud>Storage , my Mac says 176 GB of 200 GB used. What does yours say?
- Do you have more other Photos Libraries in your system in addition to this Shared Library?
- Where does your Mac's Photos Library reside-- in the Pictures folder of your internal drive, or on an external drive? or on a network? on iCloud drive?
- What is your storage on this Mac? At System Settings>General> Storage, my Mac says 745 GB of 1TBB used. What does yours say?