Are you using USB3? Quite interesting that downgrading helped.
I have been messing around with building fastboot myself without any specialized environment… but so far not found a solution to the USB3 issues.
I have hacked in retries to getvar, which seems to work well enough, but actual flashing still fails.
It is almost like commands, and in your case replies, are segmented and reassembly isn’t handled.