GarageBand stopped recognizing my piano/keyboard after installing MacOS Mojave
The article Mac OS X - Problems with MIDI devices after an update gave two possible solutions. The first had no effect but the second one, listed below, fixed my problem and now everything works beautifully.


  When installing a major Mac OS update over an existing one (not using a clean install), or when using Apple's Migration Assistant to transfer files and preferences from one Mac to another, you will often run into trouble with drivers not working properly, authorizations being lost or corrupted etc. When files are mixed between systems, or are transferred to a system they weren't specifically intended or created for, difficulty is always a possibility. (...)
  
  
  Empty the contents of the following two folders by moving their files into to two new folders on your desktop:
  
  
  Macintosh HD > Library > Audio > MIDI Drivers
  Macintosh HD > Users > [Your User Name] > Library > Audio > MIDI Drivers
  
  
  Note: the second location above is hidden on Mac OS X 10.7 and above.  To access it see these instructions.
  These are the places where third-party MIDI drivers are stored. If they have become corrupt, or they haven't been installed correctly, removing them and starting over may help.
  Restart your computer.
  Try your MIDI device again.
  If the symptom has been resolved, you should...
  
  
  Reinstall each of these drivers by visiting the home page for the respective device manufacturers. Note, if your MIDI device is Class Compliant, it doesn't require any extra drivers to be installed.
  Find and download the latest drivers for the product(s), and install them.
  Confirm all of your devices now work properly, then trash the files you had moved from your MIDI Drivers folder to your desktop.
  
  


TL;DR - I left the usb connected during the update which I guess corrupted the driver, so I had to delete and reinstall the driver (UM-One MK2)