On bikes with halogens . If you switch to LEDs. You add a load resistor like this to prevent error codes. Mabey adding a load resistor like this https://www.theretrofitsource.com/morimoto-hd-load-resistors-A-RES?quantity=1
Would trick the bike into thinking the headlight is still connected.