**Describe the bug**
When the requests are done in a very specific environment, they got an error from ClickHouse. The partially it was fixed in https://github.com/ClickHouse/ClickHouse/pull/21936

**Does it reproduce on recent release?**
It's reproducible with docker image `yandex/clickhouse-server:latest` having digest `sha256:d359e6cff39486d2563cd16a307e0981ea6150760d7589b35e0e76ee7ba889ce`

**How to reproduce**
The very precise case for reproduction is present in https://github.com/Felixoid/ch-forms-issue

**Expected behavior**
The requests should work
if (memory.size() < new_size)
    {
        if (bytes_to_append < offset && 2 * (peeked_size - offset) <= memory.size())
        {
            
            peeked_size -= offset;
            memmove(memory.data(), memory.data() + offset, peeked_size);
            if (need_update_checkpoint)
                *checkpoint -= offset;
            if (need_update_pos)
                pos -= offset;
        }
        else
        {
            size_t pos_offset = pos - memory.data();
            size_t new_size_amortized = memory.size() * 2;
            if (new_size_amortized < new_size)
                new_size_amortized = new_size;
            memory.resize(new_size_amortized);
            if (need_update_checkpoint)
                checkpoint.emplace(memory.data() + offset);
            if (need_update_pos)
            {
                BufferBase::set(memory.data(), peeked_size, pos_offset);
            }
        }
    }
    checkStateCorrect();
}
void PeekableReadBuffer::makeContinuousMemoryFromCheckpointToPos()