### 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
).id(TransformStoredDoc.documentId(storedDoc.getId())).source(source);
            if (seqNoPrimaryTermAndIndex != null) {
                
                
                indexRequest.opType(DocWriteRequest.OpType.INDEX);
                
                if (seqNoPrimaryTermAndIndex.getIndex().equals(TransformInternalIndexConstants.LATEST_INDEX_NAME)) {
                    indexRequest.setIfSeqNo(seqNoPrimaryTermAndIndex.getSeqNo())
                        .setIfPrimaryTerm(seqNoPrimaryTermAndIndex.getPrimaryTerm());
                }
            } else {
                
                indexRequest.opType(DocWriteRequest.OpType.CREATE);
            }
            executeAsyncWithOrigin(
                client,
                TRANSFORM_ORIGIN,
                IndexAction.INSTANCE,
                indexRequest,
                ActionListener.wrap(
                    r -> listener.onResponse(SeqNoPrimaryTermAndIndex.fromIndexResponse(r)),
                    e -> listener.onFailure(
                        new RuntimeException(
                            TransformMessages.getMessage(TransformMessages.TRANSFORM_FAILED_TO_PERSIST_STATS, storedDoc.getId()),
                            e
                        )
                    )
                )
            );
        } catch (IOException e) {