Hi,
With the "clean cart when order is" setting set to "created", the cart is cleared following the creation of the order, before the redirection to the payment gateway. So if you still have a cart when you come back from the payment gateway it means that it's not the same cart.
You must have had several carts linked to your user account while doing your tests, and thus when one cart is cleared, the next one in line becomes the current cart, and if you have several carts with the same thing, then you think that the cart wasn't cleared.
First, delete the carts linked to your test user account in the menu Customers>Carts of your backend.
Then, test again and hopefully you won't be able to reproduce the problem.