A few remarks.
1. The <ACCOUNTINGALLOCATIONS.LIST> tag is not correctly closed in you XML example.
2. I can reproduce the issue you mention and effectively BBEdit is returning garbage in the 'Replacement Text' field of the playground even if it shows the correct \2 in the 'Capture Groups' table.
3. If you use your pattern/replacement in a find/replace over you sample text and extract the results in a new document, you can clearly see with 'File > Hex Dump Front Document' that the replacements are pointing to random memory.
4. There is apparently a bug somewhere.
HTH,
Jean Jourdain