$by_correlation_id projection issues when using JVM client

I am having problems with events stored using the JVM client not being picked up by the $by_correlation_id projection even though $correlationId is set and correctly shows up in the event metadata in the GUI.

Metadata of event sent from JVM client:

{
  "$correlationId": "6809b54b-7bbd-45e1-99c0-b7d99321a4f8"
}

Metadata of event sent through Event Store GUI, which was correctly projected to stream with name "$bc-6809b54b-7bbd-45e1-99c0-b7d99321a4f8":

{
“$correlationId”: “6809b54b-7bbd-45e1-99c0-b7d99321a4f8”
}


$by_correlation_id configuration:

{"correlationIdProperty":"$correlationId"}

Event Store version:
Event Store 5.0.0.0 from docker image eventstore/eventstore

Client version:

<dependency>

    <groupId>com.geteventstore</groupId>

    <artifactId>eventstore-client_2.11</artifactId>

    <version>6.0.0</version>

</dependency>

Jackson is used to create the JSON string that is passed to the jsonMetadata method of EventDataBuilder (also tried metadata method, don't know the difference).

Has anyone else experienced similar problems?