I’ve prepared some notes on how I’ve handled this that might be helpful
Xero guides - Managed Fund Tax Statements (part 1)