A7670G-labe problem with esp32

Hello Guys

I'm facing a problem with the A7670G-labe with esp32

When I use RX0 and TX0, the esp32 print data in the console is fine
but when I use RX 16 and TX 17, the esp32 prints the incrrupted data like image

Make the baud rate the same on the monitor and the code.

this is my code

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial2.begin(115200,SERIAL_8N1,16,17);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Serial.available()) {
    Serial2.write(Serial.read());
  }
  if (Serial2.available()) {
    Serial.write(Serial2.read());
  }
}

and this when I use RX0 and TX0

Does Serial.write() work if the value is a literal? e.g. Serial.write(5);