Avalara does have a UE script also to calculate tax, but won’t be triggered by another UE script, especially anything done in the afterSubmit function. It’s an issue we had where we were adding automated fees to an order.
You have to make sure all changes needed for taxing are done in the beforeSubmit function and that the Avatax UE runs after any other UE script.
That’s what we had to do. Add any special automated fees in a beforeSubmit function. Then make sure that UE was higher on the list than the Avatax UE in the scripted records area for Sales Orders.