### 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
TRANSFORM_ORIGIN,
            new RefreshRequest(TransformInternalIndexConstants.LATEST_INDEX_NAME),
            ActionListener.<RefreshResponse>wrap(r -> listener.onResponse(true), listener::onFailure),
            client.admin().indices()::refresh
        );
    }
    private void parseTransformLenientlyFromSource(
        BytesReference source,
        String transformId,
        ActionListener<TransformConfig> transformListener
    ) {
        try (
            InputStream stream = source.streamInput();
            XContentParser parser = XContentFactory.xContent(XContentType.JSON)
                .createParser(xContentRegistry, LoggingDeprecationHandler.INSTANCE, stream)
        ) {
            transformListener.onResponse(TransformConfig.fromXContent(parser, transformId, true));
        } catch (Exception e) {
            logger.error(TransformMessages.getMessage(TransformMessages.FAILED_TO_PARSE_TRANSFORM_CONFIGURATION, transformId), e);
            transformListener.onFailure(e);
        }
    }
    private void parseCheckpointsLenientlyFromSource(
        BytesReference source,
        String transformId,
        ActionListener<TransformCheckpoint> transformListener
    ) {
        try (
            InputStream stream = source.streamInput();
            XContentParser parser = XContentFactory.xContent(XContentType.JSON)