### 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/DiffableUtils.java
upserts.add(entry);
                    inserts++;
                } else if (entry.getValue().equals(previousValue) == false) {
                    if (valueSerializer.supportsDiffableValues()) {
                        diffs.add(Map.entry(entry.getKey(), valueSerializer.diff(entry.getValue(), previousValue)));
                    } else {
                        upserts.add(entry);
                    }
                }
            }
            int expectedDeletes = before.size() + inserts - after.size();
            var deletes = new ArrayList<K>(expectedDeletes);
            if (expectedDeletes > 0) {
                for (K key : before.keySet()) {
                    if (after.containsKey(key) == false) {
                        deletes.add(key);
                        if (--expectedDeletes == 0) {
                            break;
                        }
                    }
                }
            }
            return new JdkMapDiff<>(keySerializer, valueSerializer, deletes, diffs, upserts);
        }
        @Override
        public Map<K, T> apply(Map<K, T> map) {
            Map<K, T> builder = new HashMap<>(map);
            for (K part : deletes) {
                builder.remove(part);
            }