S3 input plugin with multiline codec. Last one is always lost

I have log format like this

Accept:application/json, text/javascript, */*; q=0.01\r\n
Content-Type:application/x-www-form-urlencoded; charset=UTF-8\r\n

and my logstash.conf

input {
    s3 {
        codec => multiline {
             pattern => "<<<\n"
             negate => true
             what => "previous"

output {
    elasticsearch {
        host => ""
        index => "tt"

With this config, I always lose last one log.
for example, I have 450 logs but only 449 logs in Elasticsearch.

How could I solve this problem ?
Or I should not use multiline codec ?

English is not my mother language, if any word is offensive, please tell me.

Thank you

Same here!