In https://github.com/elastic/elasticsearch/pull/88639 we introduced a new setting that allows configuring a maximum headroom in disk watermarks that helps reducing the waste of disk space in large disks. The disk health indicator should take that new setting into account to avoid reporting issues when there's still room for new data in the cluster. 

https://github.com/elastic/elasticsearch/blob/6ec31ed1533e6aaf8fc6dabda5e419f5dce984fa/server/src/main/java/org/elasticsearch/health/metadata/HealthMetadata.java#L193-L199

Those calls should take into account the available max headroom.
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadata.java
public ByteSizeValue getFreeBytesFrozenFloodStageWatermark(ByteSizeValue total) {
            return getFreeBytes(total, frozenFloodStageWatermark, frozenFloodStageMaxHeadroom);
        }
        private String getThresholdStringRep(RelativeByteSizeValue relativeByteSizeValue) {
            if (relativeByteSizeValue.isAbsolute()) {
                return relativeByteSizeValue.getAbsolute().getStringRep();
            } else {
                return relativeByteSizeValue.getRatio().formatNoTrailingZerosPercent();
            }
        }
        public String describeHighWatermark() {
            return getThresholdStringRep(highWatermark);
        }
        public String describeFloodStageWatermark() {
            return getThresholdStringRep(floodStageWatermark);
        }
        public String describeFrozenFloodStageWatermark() {
            return getThresholdStringRep(frozenFloodStageWatermark);
        }
        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Disk disk = (Disk) o;
            return Objects.equals(describeHighWatermark(), disk.describeHighWatermark())
                && Objects.equals(highMaxHeadroom, disk.highMaxHeadroom)
                && Objects.equals(describeFloodStageWatermark(), disk.describeFloodStageWatermark())
                && Objects.equals(floodStageMaxHeadroom, disk.floodStageMaxHeadroom)
                && Objects.equals(describeFrozenFloodStageWatermark(), disk.describeFrozenFloodStageWatermark())
                && Objects.equals(frozenFloodStageMaxHeadroom, disk.frozenFloodStageMaxHeadroom);