When merging Donor Acknowledgement Letters, there is an option under Format to select how the letters will be sorted. Query is an option and the merge should be based on how the output is sorted in query.
This is resolved in 7.96 patch 13, released in September - October 2018 and applied to databases in Blackbaud Hosting Services. If your database is installed locally, download and install the latest version and patch, if applicable.
Steps to Duplicate
Create gift query
Add output fields
Choose field(s) to sort by
Save and close query
Go to Mail > Donor Acknowledgement Letters and create a new letter
Add query and create letter
On the format tab under Sort, select to sort by query