The problem is in the Kodi 18 switching to libinput. It handles keyboards and mice but doesn’t handle joysticks so you need to tell the libinput to ignore this device by assigning the LIBINPUT_IGNORE_DEVICE flag to it.
Updated quick solution:
nano /storage/.config/udev.rules.d/99-gamepad.rules
Copy this 2 lines and replace “Gamepad” with your device name (for me it is "Xbox Wireless Controller") (check that the ENV part is kept on the same line and is not wrapped like on the forum):
SUBSYSTEM=="input", ATTRS{name}=="Gamepad", KERNEL=="event*", MODE="0666", ENV{LIBINPUT_IGNORE_DEVICE}="1"
SUBSYSTEM=="input", ATTRS{name}=="Gamepad", KERNEL=="event*", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
Then reload udev:
udevadm trigger