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.