Are you the owner of the shared album? Did you share the deleted photos to the album?
I am asking, because only the owner of a shared album can delete all photos from the album.
Any other person can delete the photos they shared to the shared album.
It may appear like photos are vanishing out of the blue, if the shared albums have not been syncing with iCloud quite for some time, but someone deleted the photos from a different device and thus from iCloud. Then when your device starts syncing the shared album with iCloud again, Photos will download the current state of this shard album from iCloud and the photos, that have been deleted from the shared album on a different device will now deleted from your device as well.
when someone is sharing photos with us in a shared album, we should save the ones that we want to keep, as soon as we receive them, because the person who shared them might be removing them soon. The Shared Albums are not meant to be used as a permanent storage.