Sending a large payload, 2162 bytes as an example, disconnects the client immediately and reports -6 as an error, which corresponds to:
LWMQTT_NETWORK_FAILED_WRITE = -6
Edit: The buffer size for the client is sufficient:
static MQTTClient mqtt(128 + 48/* read */, 128 + 4096/* write */);