Logstash Does Not Read In Last Line of Log

Multiline filter has been deprecated in favor of multiline-codec But the problem still persist with codec .
Does anybody has any workaround ? Last line of the logs is not getting processed

input {
beats {
port => 5044
codec => multiline {
pattern => "^\s"
negate => "true"
what => "previous"
}
}
}