### Elasticsearch Version

Doesn't matter

### Installed Plugins

_No response_

### Java Version

all

### OS Version

doesn't matter

### Problem Description

When you send a `scroll` request to the low level rest client it uses it's standard retry mechanism which catches all errors and just retries against another ES instance. The trouble with that is that you *can't* retry a scroll - it generally consumes state on the server and moves to the next page.

### Steps to Reproduce

Scroll with low level rest client.

### Logs (if relevant)

_No response_
client/rest/src/main/java/org/elasticsearch/client/RestClient.java
}
    /**
     * A gzip compressing entity that also implements {@code getContent()}.
     */
    public static class ContentCompressingEntity extends GzipCompressingEntity {
        public ContentCompressingEntity(HttpEntity entity) {
            super(entity);
        }
        @Override
        public InputStream getContent() throws IOException {
            ByteArrayInputOutputStream out = new ByteArrayInputOutputStream(1024);
            try (GZIPOutputStream gzipOut = new GZIPOutputStream(out)) {
                wrappedEntity.writeTo(gzipOut);
            }
            return out.asInput();
        }
    }
    /**
     * A ByteArrayOutputStream that can be turned into an input stream without copying the underlying buffer.
     */
    private static class ByteArrayInputOutputStream extends ByteArrayOutputStream {
        ByteArrayInputOutputStream(int size) {
            super(size);
        }
        public InputStream asInput() {
            return new ByteArrayInputStream(this.buf, 0, this.count);
        }
    }
}