Hi Danny,
To resolve the issue you describe, I think that first of all, you'd want to access your CP-TS16's Configuration -- Network -- Network Services Settings area and disable any Network Service which isn't actually being used with your use-case of the product.
Next, you'll want to enable TCP Keep-alive, as described in this area of the User Guide:
https://www.digi.com/resources/documentation/digidocs/90000565/#references/r-tcp-keepalive-settings.htm
For idle timeout, go with 0 Hrs:0 Mins:10 Secs, along with a Probe Interval of 10, and Probe Count of 5, as these are the minimum values allowable (which would allow you to free up the "stuck" serial port faster).
If the above doesn't resolve the behavior you describe, you'll want to contact Technical Support after registering your product at the following link as your next step:
https://www.digi.com/support/warranty