Only the top photo is selected. Press S key to expand the stack then use the shift key to selet the entire stack. After export press S again to re-stack or use the Photo menu.
Additional options that may help:
- Shift-click on the stack badge in the upper-left corner of the thumbnail. That will expand the stack and select all the photos in the stack.
- If you're exporting all the photos in the current grid view (e.g. all the photos in a collection, possibility filtered by the Filter bar), do Photo > Stacking > Expand All Stacks then select all the photos.