Lucene 9.8 updates the vector dimension limit overridability. Moving it to the codec. 

We should switch our override to do this correctly now, instead of returning a `FieldType` overriding the value.

For now, this commit would belong in the `lucene_snapshot` branch.
server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java
public Builder(String name, IndexVersion indexVersionCreated) {
            super(name);
            this.indexVersionCreated = indexVersionCreated;
            final boolean indexedByDefault = indexVersionCreated.onOrAfter(INDEXED_BY_DEFAULT_INDEX_VERSION);
            this.indexed = Parameter.indexParam(m -> toType(m).indexed, indexedByDefault);
            if (indexedByDefault) {
                
                this.indexed.alwaysSerialize();
            }
            this.similarity = Parameter.enumParam(
                "similarity",
                false,
                m -> toType(m).similarity,
                (Supplier<VectorSimilarity>) () -> indexedByDefault && indexed.getValue() ? VectorSimilarity.COSINE : null,
                VectorSimilarity.class
            ).acceptsNull().setSerializerCheck((id, ic, v) -> v != null);
            this.indexed.addValidator(v -> {
                if (v) {
                    if (similarity.getValue() == null) {
                        throw new IllegalArgumentException("Field [index] requires field [similarity] to be configured and not null");
                    }
                } else {
                    if (similarity.isConfigured() && similarity.getValue() != null) {
                        throw new IllegalArgumentException(
                            "Field [similarity] can only be specified for a field of type [dense_vector] when it is indexed"
                        );
                    }
                    if (indexOptions.isConfigured() && indexOptions.getValue() != null) {
                        throw new IllegalArgumentException(
                            "Field [index_options] can only be specified for a field of type [dense_vector] when it is indexed"