If the usb cable is disconnected and reconnected cubase cannot re-establish the midi connection, have to restart cubase. Tested using Yamaha S90 keyboard.
If you power up or plug a midi device for the first time then Cubase won’t recognise it without a restart. No way around this unless they add a rescan feature…been requested for years.
However if your device was connected and powered when Cubase started but has become disconnected or lost power you may be able to reconnect using: Devices/Device Setup/select Midi Port Setup/Reset.