If you’re exporting to XML, it depends on what you’re using, but it’s probably outputing them in the order that they were uploaded to WP. Gallery images are WP Media files and these are posts that are exported. The only way to get them in the same order is if the tool you’re using to export to XML reads the value of the ACF field to reorder post IDs before output.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users