On DealPOS, you can setup on the Sell menu to make the item cart empty when the cashier/user try to change the customer name while there's items in the cart.
To apply this setup, you can follow the steps bellow:
I. How to setup
Step 1. Go to Setup, click more menu, click on module
Step 2. Go to module Sell, scroll down to Customer section, set the Empty cart on changes to Yes, click Save button
After you've done setup the Empty cart on changes to Yes, you can try to make transaction to see how this setup work as on example below: