Serial communication issue with Nano Every

Hi,
I have a simple sketch (see below) that runs fine on a Leonardo with a VB App that sends simple commands to turn the led on/off and get a reply via serial.
With the Nano Every, the sketch works fine using the IDE Serial Monitor.
It does not work with my VB app: the led does not turn on or off, the read from the serial port only returns one character and that one has nothing to do with what is in the sketch code.
Is this a question of setting better delays or something else?
Thanks

#include <Wire.h>


#define  LED_PIN						(13)
#define SERIAL_BAUD					(9600)

char incoming_byte = 0;

void setup() {
  // put your setup code here, to run once:
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, LOW);
  Serial.begin(9600);
  //Serial.flush();
  delay(2000);
  while(!Serial); //Wait for the serial port connection to open
  Serial.println("Setup Complete"); 
  //Serial.flush(); 
  //delay(2000);
}

void loop() {
  // put your main code here, to run repeatedly:
  // Step 1: Just blink the LED. OK, verified this works
  // Step 2: increase time to 1 sec and print a status ON or OFF
  // Simple Serial1.println() does not output to the serial monitor?
  //Got it, I used Serial1 and should have used Serial
  //Works for the Loop() but not in the Setup(). Not sure why
  //Step 3: Use the VB App.
  //Connection Failed in the VB app, but Arduino seems to see it opened.
  //Started connecting after WIn11 restart: likely killed whatever kept COM5 open...
  //Can receive data through Serial: Rx led flashes and sketch responds
  //Cannot send data through Serial: TX led does not flash, and sketch does not hang up
  //Serial.flush only works on the sending buffer and its function is to pause the sketch while the send buffer clears

  delay(2000);
  //digitalWrite(LED_PIN, HIGH);
  //delay(1000);
  //Serial.println("LED is ON");
  //delay(1000);
  //digitalWrite(LED_PIN, LOW);
  //delay(1000);
  //Serial.println("LED is OFF");
  //delay(1000);
  // Try to see if Arduino responds to a serial input, whatever it is
  while(!Serial);
   if (Serial.available()>0) {
    incoming_byte = Serial.read();
 // 
    if (incoming_byte=='1') {
      digitalWrite(LED_PIN, HIGH);
      delay(1000);
      Serial.println("Led is ON");
      delay(1000);
      //Serial.flush();   //Wait for the send buffer to clear
    }
    else if(incoming_byte =='2') {
      digitalWrite(LED_PIN, LOW);
      Serial.println("Led is OFF");
    }
   }
  //digitalWrite(LED_PIN, HIGH);
  //Serial.println("ON");
  //delay(4000);
  //digitalWrite(LED_PIN, LOW);
  //Serial.println("OFF");
  //delay(1000);
}

I removed the cruft.
I also changed the character that sets the output to 0 to, well, '0'.
Try this:

#include <Wire.h>

void setup() {
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, LOW);
  Serial.begin(9600);
  while (!Serial); //Wait for the serial port connection to open
  Serial.println("Setup Complete");
}

void loop() {
  char incoming_byte = 0;  //define this in loop() because it's only used in loop
  if (Serial.available() > 0) {
    incoming_byte = Serial.read();
    if (incoming_byte == '1') {
      digitalWrite(LED_PIN, HIGH);
      Serial.println("Led is ON");
    }
    else if (incoming_byte == '0') {
      digitalWrite(LED_PIN, LOW);
      Serial.println("Led is OFF");
    }
  }
}

Thank you. The reason I used '2' to turn the led off is because that is what the button in VB is set to do (and that is not the issue I am having).
Moving the char incoming byte =0 to the loop() is a good suggestion.
It did not help.
The sketch was and is working fine with the IDE Serial Monitor, whether I use a Leonardo or a Nano Every.
With my VB App, two different behaviors and I cannot (yet) figure out why but it is tied to the serial port settings (within Windows) and getting incomplete transfers when using the Nano Every so I will try to see if I can add VB code to make sure I get the full string in my event handler (DataReceived).

That it did not help tells me the problem is at the sending end. VB's a long ways in the rear view mirror for me, but ISTR there may be some form of handshaking going on that you might have to suppress when you open the port.

Thanks, that is what I am focusing on now, trying different things to sort what could work and what does not.