Quick summary: this is expected behavior when 1) you delete and annotation and 2) another annotation also exists on the same MediaAsset (as shown in your photo example).
I’ll provide a description of how Annotation removal works when only one annotation is left on an Encounter.
If the annotation is the last annotation on the Encounter AND the annotation is the last annotation remaining on the MediaAsset, we remove the annotation (technically we convert it to a simple Annotation called a “trivial annotation” that covers the whole photo) but leave the MediaAsset on the Encounter to prevent data loss. You could then click “remove this image” to truly remove the photo.
The other case is what you saw and is expected behavior. If you select “remove annotation” and there is another annotation on the MediaAsset on another Encounter, we will remove the annotation from the Encounter (the user told us too and clicked the confirmatuon dialog), and the MediaAsset then is no longer referenced from the Encounter, leaving the Media Gallery empty. The links between MediaAssets and Encounters are Annotations. There is no data loss however since the other Encounter still has an Annotation that references the MediaAsset.
So you are seeing the feature and designed and tested.