TWRP: adb devices works in recovery but fails in sideload mode
Eventually, I found a workaround (which is not a fix but it allowed me to continue the installation).

Since my device was detected in discovery, I did not used sideload. I just pushed the image to the sdcard with:

adb push xxxxx.zip /sdcard/


and then I installed the image from the sdcard directly in TWRP.