Very odd behavior of Serial stream

for readBytesUntil you should know exact lenght..
no I mean to call instead serial.read

    uint8_t timedRead() {
      uint32_t prev_millis = millis();
      do {
        if (peek()) return read();
      } while (millis() - prev_millis < time_out);
      return 0;               // indicates timeout
    }