Why Docker Container State OOMKilled not working properly?

The application exceeded the jvm memory limitation before it exceeded the container restriction.