I think the ID is changed because Mbed USBSerial API (all USB APIs) set its own IDs in constructor.
You can retarget/remapping the default console to onboard USB. You can found that in discussion of the topic what I mentioned in my previous post, you can try that.
BR, Jan