Although you should never have to pay twice for the energy you use (any over-payments are always refunded), it's quite common to have two active Direct Debits until your old supplier closes your account and this can take up to 6 weeks. They can only close your account once your final bill has been settled - either with a refund to you, or a final payment from you.
Since this direct debit cancellation happens when your account closes, you shouldn't have to do anything. If you do cancel your old supplier's Direct Debit before they do, any closing credits or debits have to be made another way – by cheque, for example. Direct debits are always cancelled automatically once the final bill has been settled so it's worth thinking about the impact of the cancellation before deciding to do it.
If you're worried about this, check with your bank once you've had confirmation from your old supplier that your account has been closed, the balance settled and that the direct debit has been cancelled. This account closure and direct debit cancellation can take up to 6 weeks from the point of leaving a supplier. If you'd like this to happen sooner, for peace of mind, contact your supplier directly and ask that you account be closed and the balance settled as soon as possible. You can do this through your dashboard: Contact Supplier (link to your dashboard where you click on the Contact Supplier button on the side panel.)