### Elasticsearch Version

main

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

MacOS

### Problem Description

When there are 2 or more concurrent `_update` requests issued, one of them may fail with `ResourceAlreadyExistsException` exception which is misleading.


### Steps to Reproduce

1. Spawn a number of `_update` requests at the same time
2. Look at the results of these requests
3. Observe `ResourceAlreadyExistsException` being thrown in the case of conflict

### Logs (if relevant)

_No response_
x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/persistence/IndexBasedTransformConfigManager.java
DeleteIndexRequest deleteRequest = new DeleteIndexRequest(indicesToDelete.toArray(new String[0])).indicesOptions(
            IndicesOptions.LENIENT_EXPAND_OPEN
        );
        executeAsyncWithOrigin(client, TRANSFORM_ORIGIN, DeleteIndexAction.INSTANCE, deleteRequest, ActionListener.wrap(response -> {
            if (response.isAcknowledged() == false) {
                listener.onFailure(new ElasticsearchStatusException("Failed to delete internal indices", RestStatus.INTERNAL_SERVER_ERROR));
                return;
            }
            listener.onResponse(true);
        }, listener::onFailure));
    }
    private void putTransformConfiguration(
        TransformConfig transformConfig,
        DocWriteRequest.OpType optType,
        SeqNoPrimaryTermAndIndex seqNoPrimaryTermAndIndex,
        ActionListener<Boolean> listener
    ) {
        try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
            XContentBuilder source = transformConfig.toXContent(builder, new ToXContent.MapParams(TO_XCONTENT_PARAMS));
            IndexRequest indexRequest = new IndexRequest(TransformInternalIndexConstants.LATEST_INDEX_NAME).opType(optType)
                .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
                .id(TransformConfig.documentId(transformConfig.getId()))
                .source(source);
            if (seqNoPrimaryTermAndIndex != null) {
                indexRequest.setIfSeqNo(seqNoPrimaryTermAndIndex.getSeqNo()).setIfPrimaryTerm(seqNoPrimaryTermAndIndex.getPrimaryTerm());
            }
            executeAsyncWithOrigin(
                client,
                TRANSFORM_ORIGIN,
                IndexAction.INSTANCE,