GSM module sending gibberish only when receiving SMS

Hello! I’ve been trying out A6 GSM module. This is the code I’m using:

#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(11, 12);

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
  
  //Begin serial communication with Arduino and A6
  mySerial.begin(9600);

  Serial.println("Initializing..."); 
  delay(1000);

  mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
  updateSerial();
  
  mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
  updateSerial();
  mySerial.println("AT+CNMI=1,2,0,0,0"); // Decides how newly arrived SMS messages should be handled
  updateSerial();
}

void loop()
{
  updateSerial();
}

void updateSerial()
{
  delay(500);
  while (Serial.available()) 
  {
    mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
  }
  while(mySerial.available()) 
  {
    Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
  }
}

It works fine, until I send a SMS message to the module. It’s set on 9600 baud 100%, I checked it with a command.
then it outputs gibberish (look at the image below).

I’m not sure what the issue could be, please help me as I’ve been trying to fix this for days now.
Thanks!

I suspect a power issue, that is the only thing that comes to mind.

I agree with Deva_Rishi, but also, I’m not keen on the delay(500) for unrelated reasons.

Agreed with that as well, i think it should be like this :

void updateSerial()
{  
  while ((Serial.available()) || (mySerial.available()))
  {
    if (Serial.available())  mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
    if (mySerial.available())  Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
    if ((!Serial.available()) && (!mySerial.available())) delay(2);
  }
}

So the buffer can not overflow.