What happens to a WebSocket connection when the client’s IP address changes?

What happens to a WebSocket connection when the client’s IP address changes? For example, if I’m driving across the country, and my phone is switching from cell tower to cell tower, my IP address is changing. It also changes when I switch from LTE to WiFi or vice versa. How is a WebSocket connection maintained in that scenario?

Also, is this how iMessage works? An ‘always on’ WebSocket connection to Apple’s servers, along with some sort of pub/sub messaging service on the back end? Can you explain how iMessage handles this?