How to track or retrieve the deleted record from GL Entry Table
Please refer :
https://frappe.github.io/erpnext/user/manual/en/using-erpnext/restore-deleted-docs
Hope this helps.
The records from GL Entry table deleted when you cancel a transaction. There is no way to retrieve deleted GL Entry record. To create GL Entry record for any transaction, you need to amend the transaction.