Technically 18650s can be drained all the way down to an absolute cutoff of 2.5 volts per cell without damaging them
However I don’t reccommend that for ebords, as if your software or hardware fails to cut off the battery quickly enough if you have voltage sag under load, you will damage the cells if they’re pulled below 2.5 volts
Your probably getting a lot of voltage sag with 6s/ 5000 / 20C especially with the gear ratio your running.
Your weight, wind resistance, riding style and riding conditions can have a lot to do with it as well.