I had similar issues with multiple TCP ports.
In the past it seemed fixed:
But most recently i have started using virtual com software, which makes the code less hard to duplicate when switching ipadresses.
If you are running linux you could use socat. https://www.redhat.com/sysadmin/getting-started-socat
On windows you couls use USR vcom or Lantronix CPR