Hi Mark,
To avoid deadlock, usually you need to focus on the code.
Below is an example for deadlock:
1. Transaction1 locks record1
2. Transaction2 locks the record2
3. Transaction1 requests lock on record2, cannot lock as the record2 is already locked by Transaction2
4. Transaction2 requests lock on record1, cannot lock as the record1 is already locked by Transaction1
Neither of the transactions could continue, one of the transactions must be sacrificed to unblock the deadlock.
For troubleshooting this, you could take AX trace and see if any clue that a certain record of this table is updated by different transactions.