How to manage serial port disconnection

RFXcom is a special product for a special purpose, obviously is of no interest if you just wanna do serial comms

Are you talking about "full deploy"? If so, I think it is restarting the flow and it might be that this in itself is releasing some handles to the serial port. In later versions of NR you have the possibility to restart the flow via the "Deploy" button in the editor. Next time you see the problem with the serial, you could try this to see if it is enough to fix it, just to verify

If it seems to help, you could implement a flow restarter in the dashboard using a template node, in this thread there is a possible solution discussed