@gryzli133 MySensors is a community project. Anyone is welcome to wish for, or contribute new features. See https://www.mysensors.org/download/contributing for a guide on how to get started in case you want to contribute.
As can be seen in the comment on https://github.com/mysensors/MySensors/blob/development/core/MyGatewayTransportSerial.cpp#L37 Serial prints are always deemed successful, regardless if the serial is connected or not (the Arduino can not know if someone is listening or if the sent messages are lost). There is no need to reconnect a serial port, so writing to serial never disturbs the rest of the code. That's why the serial gateway doesn't have any problems with disconnections. I am not familiar with the mqtt code, so I don't know how much effort would be required to develop a solution.
Hopefully someone familiar with the mqtt code has som spare time to assist you, in case you need help.