It is relatively usual the cruise control to be deactivated by ECU if there is any underlying system error.
It acts that way as a safety control for eventual problems.
First of all you should check error registry. Best is if you can use some system like TuneECU or DealerTool. If not available, you can reach the registry by keeping pressed the "i" button on the left handlebar controls while switching key on. After a two or three seconds you will see the text "dtc" in the dash, followed by eventually an error code (or P000 if no errors). A short press on "i" moves between different codes if multiple errors (there will probably be more than one, one being P1574 (that code means "cruise control deactivated by other errors").
You will probably see a code that gives indication of what failed. After fixing whatever and clearing the code (it also clears by itself after three full engine cycles - moving the bike enough to run from cold to full temp), you will usually recover the cruise control.
If you see code P1575 means a full deactivation of cruise control. That happens after a series of errors that affect the driving electronics. That is supposed to need an adaptation reset by OBD2 and follow a series of actions on controls.