How to correctly enable Cycles from add-on?
I found a solution looking at how bpy.ops.preferences.addon_enable(module=&quot;cycles&quot;) was using addon_utils.enable, it needed default_set=True as an argument, which forced the add-on to be checked in the preferences and fixed the errors.
def cycles_check():
    import addon_utils
    is_enabled,is_loaded = addon_utils.check('cycles')
    if not is_loaded:
        print ('Cycles is required to use Photographer, enabling the add-on automatically.')
        success = addon_utils.enable('cycles', default_set=True)
        if success:
            print ('Cycles is now enabled.')
            return True
    else:
        return True