Abandoned cart appears after/before purchase

How to prevent abandoning carts showing up even if purchase did happen in customer session? It appears with same revenue, items as in tracked order.

Sequence of implementation:
addEcommerceItem for all items
trackEcommerceCartUpdate
trackEcommerceOrder

Hi. I have been solving the problem with abandoned baskets in vain for several months. I still see zero in the matomo. I tried several methods of measurement, but without result. How do you measure abandoned baskets? Thx