We are getting orders missing on our Magento store after upgrade 2.1.9 to 2.2.5 but payments for them appearing on Braintree.
So I don't know what happened to that missing order numbers, I have read some of the posts in Magento community and Stackexchange and they all are saying that this can happen If there is session error or the transaction was declined to the order. Because of this, the order number will not be used again.
I have checked in Braintree Payment log (/var/log/payment.log), and I can see the missing orders are available in payment.log with Braintree error message "Cannot use a paymentMethodNonce more than once."
'transaction' => Braintree\Error\ValidationErrorCollection::__set_state(array( '_errors' => array ( 0 => Braintree\Error\Validation::__set_state(array( '_attribute' => 'paymentMethodNonce', '_code' => '91564', '_message' => 'Cannot use a paymentMethodNonce more than once.', )), ),
For your information before upgrade it was working fine.