OK peeps, this is what I see:
No level conversion is required - there’s the boost to 5V and the MOSFETs for level conversion
The Hackster.IO project is interesting, overly complex, flashy, clickbait and doesn’t help with a different baud rate for the ModBus RTU than the standard 9600. Also the OP added in a booster convertor when there is already one on the adapter board. If anything it will go in to my archive of links of how LLM’s get trained on BS 

To meet the aspirations of Julia, we need to put the code back together because the changes between the two code bases aren’t in the spirit of Arduino which is very very naughty.
So, taking the original code supplied for the Arduino Uno and works on the Minima R4, we will now perform the magic Arduino transformation, thus proving Julia’s desire for a plug & play world are not totally in vein.
And also proving that most of the offerings provided on websites are great steaming piles of 

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); //TX,RX
No DFRobot, it’s not Tx,Rx, it’s actually the other way round, dumbasses.
Julia, this uses software to act as a serial port, this library isn’t available for the ESP32 as it’s not necessary but rather than saying Potato, we are going to say Potarto to switch the serial over to:
//#include <SoftwareSerial.h> // Note, commented out
HardwareSerial mySerial(2). // Use UART #2 because you can assign any pins you like
Now we’ve redirected it, there is no chance we have to hack about with anything related to the serial in the main body of the code. Extra typing leads to potential mayhem as you demonstrated with the confusion over which serial port was which. But we do need to alter the setup of the serial port to tell the ESP32 which pins to use:
mySerial.begin(4800);
becomes
mySerial.begin(4800, SERIAL_8N1, 47, 48); // baud rate, bits, RX, TX
I’d personally bypass the whole Vext and put my red lead on to pin 2 which comes from the USB so will be 5V so will replicate the official DFRobot Uno wiring diagram.
Just to annoy us all the wiring has Rx going to Rx & Tx going to Tx on the adapter. What the Actual Ffffffff? Normally we spend out lives bending our brains about crossing the serial streams. But not today.
So make sure pin 47 is on the adapter R connection and pin 48 is on the adapter T connection.
Easy enough to swap them round for testing thou.
Yeah, we all know what ‘assume’ means - it means make an Ass of U & Me. The COM definitions are ModBus commands - they have no impact at all on any board or snail or postcard used to convey them. To abstract them out, they are are poured in to the serial pipe untouched, they never impact anything other than the sensor which takes it, does the command and sends stuff back.
Hopefully this helps in terms of why Arduino exists. We only have to change the comms hardware - everything else should fall in to place and no other code needs to be altered.
The DFRobot programmer needs to be directed to the nearest cave to live out the rest of his/her days - having Com, Com1 and Com2 is just obtuse, the first one should have been Com0. And a comment to explain they were ModBus commands would have been useful. Even worse, they then say Timeout for Com, Timeout2 for Com1 and Timeout3 for Com2. Arrrrrrggggggghhhhhhhh.
// error due to Com being undefined, define before void setup()
I suspect this came about because you were code shuffling, which is why just changing the pipe rather than using the CopyNPasta keys helps.
If this simplification fails, we can look at other pins - the other obvious free ones on the pinmap are 45 & 46 but they are used at boot time so things can get messy / break / not-work.
In some ideal world, you have an Adafruit SAMD based board as a different vendor/MCU to test against to help sanity check.
Enough for now, bizarre chilli with noodles night, head chef signing off.