I2C scan on 400000

Does anybody have succeed doing I2C scan at 400k?
I download the sketch from internet

this one
Preformatted text

#include<Wire.h>

void setup(){
  Wire.begin();
  Serial.begin(9600);
  Serial.println("I2C scanner is ready.");
  Serial.println();
}

void loop() {
// scanI2C(100000);
scanI2C(400000);
//  scanI2C(1000000); // uncomment if the microcontroller supports this speed
//  scanI2C(3400000); // uncomment if the microcontroller supports this speed
//  scanI2C(5000000); // uncomment if the microcontroller supports this speed
  
  Serial.println("****************************");
  Serial.println();
  delay(10000);
}

void scanI2C(long frequency){
  String normal = "standard mode (100 kHz):";
  String fast = "fast mode (400 kHz):";
  String fastPlus = "fast mode plus (1 MHz):";
  String highSpeed = "high speed mode (3.4 MHz):";
  String ultraSpeed = "ultra fast mode (5.0 MHz):";
  String defaultStr = " !!!!! This speed is not supported !!!!!";
  bool error = true;
  bool addressFound = false;

  Serial.print("Scanning in ");
  switch(frequency){
    case 100000:
      Serial.println(normal);
      break;
    case 400000:
      Serial.println(fast);
      break;
    case 1000000:
      Serial.println(fastPlus);
      break;
    case 3400000:
      Serial.println(highSpeed);
      break;
    case 5000000:
      Serial.println(ultraSpeed);
      break;
    default:
      Serial.println(defaultStr);
      break;
  }
  
  Wire.setClock(frequency);
  for(int i=8; i<128; i++){
    Serial.println(i,HEX);
    Wire.beginTransmission(i);
    error = Wire.endTransmission();
    if(error == 0){
      addressFound = true;
      Serial.print("0x");
      Serial.println(i,HEX);
    }
  }
  if(!addressFound){
    Serial.println("No I2C device found");
  }
  Serial.println();
}

it work ok on 100000, but if I try to used at 400000 it generated the clock total random ... not 50 duty as i2c supposed to be, the time is not 2.5ms as expected for 400000 and if freeze the Arduino ... don't complete the loop
so how to make Arduino uno to really run i2c on 400000?

There is an Arduino multi speed I2C scanner available. Here's a discussion:

You may need to check to see if there's a newer version.

I tried that also
Same effect star and freeze
I capture the I2C using the logic2 just to be sure. It generate a few frame and freezes

Then your cables and pullups limit the I2C length.

I think is relate to pull out resistor
If the device been scanning is completely dead it will not generated the pull out resistor (which most case is on the slave device). I disconnected the device in question and run the sketch with open pins (scl sda) and it freeze, however if I do a pull out resistor of 10K for connecting (scl sda) it runs without freezing
Now I need read more about pull out resistor, there are many articles, but pull out resistor needs to be according to the scanned device which is this case is unknown and I can burn it if I put too much voltage.
I know it supposed to be dead, but maybe not, maybe the board been diagnostic has only not power to the i2c chip ... just in case the board that I'm trying to diagnose is a Segway 73.6v 23S BMS