Your gallery is not a files section, but a files field. If you had a files section, then pagination would definitely work using limit
(default is 20).
I don’t know if it is a bug or a feature that pagination does not work for the selected files in a files field.