Is it possible to read full message of buffer using UDR0 register?

Hello, as you can see from the code below, my Serial is occupied by MODBUS and i can't read the values I'm receiving with Serial... and I want to avoid the unnecessary looping of analog/digital writing/reading, and so I was wondering if there was any way I could read the full MODBUS message from client? I've tried doing PCINT8 interrupts, but it would just crash the board, and current UDR0 solution prints random parts of the message... My board is Arduino Mega 2560

#include <Arduino.h>
#include <ArduinoRS485.h>
#include <ArduinoModbus.h>
#include <avr/interrupt.h>
#include <libmodbus/modbus-rtu.h>
ModbusRTUServerClass server;

#define SERVER_ID                       1

#define COIL_RESERVE_12V                30
#define COIL_RESERVE_GND                20
#define COIL_RESERVE_UNIVERSAL          20

#define HREG_RESERVE_RGBW               25
#define HREG_RESERVE_LEDCOUNT           5
#define HREG_RESERVE_CONST_CURRENT      10

#define ADC_RESERVE                     10
#define GPIO_RESERVE                    100

#define COILS_12V                       12
#define COILS_GND                       4
#define COILS_UNIVERSAL                 4
#define DIG_COILS_GPIO                  28

#define ANALOG_HREG_ADC                 1
#define HREG_CONST_CURRENT              2
#define HREG_RGBW                       2
#define HREG_LEDCOUNT                   2


#define CONFIGURE_MAX_COILS             (server.configureCoils(0,(COIL_RESERVE_12V + COIL_RESERVE_GND + COIL_RESERVE_UNIVERSAL)))
#define CONFIGURE_MAX_HREGS             (server.configureHoldingRegisters(0,(HREG_RESERVE_RGBW + HREG_RESERVE_LEDCOUNT + HREG_RESERVE_CONST_CURRENT)))
#define CONFIGURE_MAX_DIG_COILS         (server.configureDiscreteInputs(0,GPIO_RESERVE))
#define CONFIGURE_MAX_ADC_REGS          (server.configureInputRegisters(0,ADC_RESERVE))

#define START_MODBUS                    (server.begin(SERVER_ID,9600))

#define ARDUINO_HREG_PIN_START          54
#define ARDUINO_COIL_PIN_START          2

void configure_hreg_pins();
void configure_coil_pins();
void configure_analog_hreg_pins();
void configure_dig_coil_pins();

void setup() {
  Serial1.begin(9600);
  START_MODBUS;
  
  if (!CONFIGURE_MAX_ADC_REGS){
    exit(-1);
  }
  else if(!CONFIGURE_MAX_COILS){
    exit(-1);
  }
  else if(!CONFIGURE_MAX_DIG_COILS){
    exit(-1);
  }
  else if(!CONFIGURE_MAX_HREGS){
    exit(-1);
  }

  for(int i =ARDUINO_COIL_PIN_START;i<DIG_COILS_GPIO+ARDUINO_COIL_PIN_START-1;i++){
    pinMode(i,INPUT);
  }

  for(int i=DIG_COILS_GPIO+ARDUINO_COIL_PIN_START;i<=(DIG_COILS_GPIO+ARDUINO_COIL_PIN_START+COILS_12V+COILS_GND+COILS_UNIVERSAL); i++){
    pinMode(i,OUTPUT);
  }

  for(int i= ARDUINO_HREG_PIN_START; i<(HREG_CONST_CURRENT+HREG_LEDCOUNT+HREG_RGBW)+ARDUINO_HREG_PIN_START-1;i++){
    pinMode(i,OUTPUT);
  }

  for(int i=ARDUINO_HREG_PIN_START+(HREG_CONST_CURRENT+HREG_LEDCOUNT+HREG_RGBW);
   i<((HREG_CONST_CURRENT+HREG_LEDCOUNT+HREG_RGBW)+ARDUINO_HREG_PIN_START+ANALOG_HREG_ADC);i++){
    pinMode(i,INPUT);
  }

  Serial1.println("Boot successfull");
  
}


void loop() {
  server.poll();
  unsigned char resh,resl;
  while ( !(UCSR0A & (1<<RXC0)) );
  resh = UCSR0B;
  resl = UDR0;
  resh = (resh >> 1) & 0x01;
  Serial1.println((resh <<8) | resl);
  configure_coil_pins();
  configure_hreg_pins();
  configure_dig_coil_pins();
  configure_analog_hreg_pins();
}

void configure_hreg_pins(){
  for(int i= ARDUINO_HREG_PIN_START; i<(HREG_CONST_CURRENT+HREG_LEDCOUNT+HREG_RGBW)+ARDUINO_HREG_PIN_START-1;i++){
    analogWrite(i,server.holdingRegisterRead(i-ARDUINO_HREG_PIN_START));
  }
}

void configure_analog_hreg_pins(){
  for(int i=(HREG_CONST_CURRENT+HREG_LEDCOUNT+HREG_RGBW)+ARDUINO_HREG_PIN_START;
  i<=DIG_COILS_GPIO+(HREG_CONST_CURRENT+HREG_LEDCOUNT+HREG_RGBW)+ARDUINO_HREG_PIN_START;
  i++){
    uint16_t value = analogRead(i-HREG_CONST_CURRENT-HREG_LEDCOUNT-HREG_RESERVE_RGBW-ARDUINO_HREG_PIN_START);
    server.inputRegisterWrite(i,value);
  }

}

void configure_coil_pins(){
  for(int i=DIG_COILS_GPIO+ARDUINO_COIL_PIN_START;i<=(DIG_COILS_GPIO+ARDUINO_COIL_PIN_START+COILS_12V+COILS_GND+COILS_UNIVERSAL); i++){
    uint8_t value = digitalRead(i-DIG_COILS_GPIO-ARDUINO_COIL_PIN_START);
    server.discreteInputWrite(i,value);
  }
}

void configure_dig_coil_pins(){
  for(int i =ARDUINO_COIL_PIN_START;i<DIG_COILS_GPIO+ARDUINO_COIL_PIN_START-1;i++){
    digitalWrite(i,server.coilRead(i-ARDUINO_COIL_PIN_START));
  }
  
}