When canceling the susbcription with the paid resourse overusage, the active DeliverLines and the cancelation order details are for different periods and sum. DeliverLines are used for data export to external billing system, so they need to be correct and correspond to the order details.
The issue is caused by the bug with id #PBA-61330 ("Active delivery line and order details are for different sum on cancelation").
The logic has been changed in BA 6.0, so the issue is not reproducible anymore. Upgrade to BA 6.0.x to avoid an issue.