Is it possible to program continuous serial/LoRA communication?

Hello, I have two Arduino MKR WAN 1310s communicating to each other wirelessly through LoRa, but it also prints information to the user through the serial monitor. The output Arduino receives data from the input Arduino through a slide switch. It then turns a LED on and off based on the information it receives from the input Arduino. However, when I unplug the power from either Arduino’s USB to my computer, it stops communication until I re-upload the sketch. Is there any way I could keep the connection open through code so that the Arduinos can work without having to be connected to my computer and updated?

I tried powering my arduinos without the computer by connecting them to a phone charger through a multiple USB port. It powered them, but the program did not run.

Here is code for the output arduino:

#include <SPI.h>
#include <LoRa.h>

int led = 0;
char packettext;

void setup() {
  Serial.begin(9600);
  pinMode(led, OUTPUT);
  while (!Serial);

  Serial.println("LoRa Receiver");

  if (!LoRa.begin(915E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
}

void loop() {
  // try to parse packet
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    // received a packet
    Serial.print("Received packet '");

    // read packet
    while (LoRa.available()) {
    packettext = ((char)LoRa.read());


    Serial.print(packettext);
    
    if (packettext == '1')
    {
      digitalWrite(led, HIGH);
    }

    if (packettext == '0')
    {
      digitalWrite(led, LOW);
    }

    
    }

    // print RSSI of packet
    Serial.print("' with RSSI ");
    Serial.println(LoRa.packetRssi());
  }
}

Here is code for the input Arduino:

#include <SPI.h>
#include <LoRa.h>

int counter = 0;
int button = 7;
int readbutton = 0;

void setup() {
  Serial.begin(9600);
  pinMode(button, INPUT);
  while (!Serial);

  Serial.println("LoRa Sender");

  if (!LoRa.begin(915E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
}

void loop() {

readbutton = digitalRead(button);

if (digitalRead(button) == HIGH)
{
  LoRa.beginPacket();
  LoRa.print("1");
  LoRa.endPacket();
  Serial.println("on");
}

if (digitalRead(button) == LOW)
{
  LoRa.beginPacket();
  LoRa.print("0");
  LoRa.endPacket();
  Serial.println("off");
}

  // send packet


}

The while (!Serial); line tells the arduino to wait until there is a valid USB serial connection before going on to the rest of the code. Comment out that line and it should work.

I thought LORA bandwidth was supposed to be rationed. Is it really acceptable to be sending continuous messages through it?