Anyway, did you already try to replace
delay(3000); by
SerialUSB.delay(3000); ?
Thank you for fast answer I tried but
I close the USB by 'SerialUSB.end()' befor I delay and reboot.
In my opinion the problem is, that the bootloader requires something to be initialized is a way a hard reset makes but the reboot function doesn't made.
But I have no idea what it is.
I had a look in the source of the bootloader, but it was to complex for me.