### Description

When using the DiffableUtils.diff with a vanilla OpenJDK Map, instead of the legacy ImmutableOpenMap interface, we return a mutable map (generic HashMap), which isn't the expected behaviour of the API:

https://github.com/elastic/elasticsearch/blob/45c56b22f946733712ad6d92600411c0885594c5/server/src/main/java/org/elasticsearch/cluster/DiffableUtils.java#L85

We should wrap the map returned by the diff API in an unmodifiable version.
server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java
public boolean clusterUUIDCommitted() {
        return this.clusterUUIDCommitted;
    }
    /**
     * Returns the merged transient and persistent settings.
     */
    public Settings settings() {
        return this.settings;
    }
    public Settings transientSettings() {
        return this.transientSettings;
    }
    public Settings persistentSettings() {
        return this.persistentSettings;
    }
    public Map<String, String> hashesOfConsistentSettings() {
        return this.hashesOfConsistentSettings;
    }
    public CoordinationMetadata coordinationMetadata() {
        return this.coordinationMetadata;
    }
    public Version oldestIndexVersion() {
        return this.oldestIndexVersion;
    }
    public boolean equalsAliases(Metadata other) {
        for (IndexMetadata otherIndex : other.indices().values()) {
            IndexMetadata thisIndex = index(otherIndex.getIndex());
            if (thisIndex == null) {
                return false;
            }