### Elasticsearch Version

main

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

MacOS

### Problem Description

Currently, transform state persistence failures are being retried with a constant interval (`60s`).
This is different to how other types of errors are retried (exponential backoff).
We should implement exponential backoff for state persistence failures too.

### Steps to Reproduce

n/a

### Logs (if relevant)

_No response_
x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformFailureHandler.java
retry(scriptException, message, true, -1);
        } else {
            fail(scriptException, message);
        }
    }
    /**
     * Handle bulk indexing exception case. This is error can be irrecoverable.
     *
     * @param bulkIndexingException BulkIndexingException thrown
     * @param unattended whether the transform runs in unattended mode
     * @param numFailureRetries the number of configured retries
     */
    private void handleBulkIndexingException(BulkIndexingException bulkIndexingException, boolean unattended, int numFailureRetries) {
        if (unattended == false && bulkIndexingException.isIrrecoverable()) {
            String message = TransformMessages.getMessage(
                TransformMessages.LOG_TRANSFORM_PIVOT_IRRECOVERABLE_BULK_INDEXING_ERROR,
                bulkIndexingException.getDetailedMessage()
            );
            fail(bulkIndexingException, message);
        } else {
            retry(bulkIndexingException, bulkIndexingException.getDetailedMessage(), unattended, numFailureRetries);
        }
    }
    /**
     * Handle a generic elasticsearch exception. This is error can be irrecoverable.
     * <p>
     * The failure is classified using the http status code from the exception.
     *
     * @param elasticsearchException ElasticsearchException thrown
     * @param unattended whether the transform runs in unattended mode