Hi pippypip,
Currently, MYOB doesn't allow for direct changes to the customer's name on an existing invoice, which is why creating a new invoice is necessary. The invoice numbering behavior you described, where MYOB picks up the next number sequentially instead of recognising the previously used one, is expected functionality. This occurs because MYOB tracks each invoice sequentially for consistency.
To work around this, you can manually adjust the invoice number when creating the new invoice to ensure it uses the correct sequence. Alternatively, you can turn on 'Warning for Duplicate Invoice Numbers' in your settings by going to Setup > Preferences > Sales > Warn for Duplicate Invoice Numbers on Recorded Sales. If it's already turned on, turn on Warn for duplicate Invoice numbers and Customer PO numbers too, which might help identify if an invoice number has been used before.
Regards,
Sai