The data will get lost. At the very latest, the last router in the chain will send a "Who has X" ARP request and get no answer, so it will not be able to deliver the packet. Or, if it still has the MAC address in its ARP cache, it will send the frame to a MAC address that no longer exists on the network, and the frame will just end up being ignored by every device.
Or, some other device has been assigned IP address X in the meantime, so that device will answer, the router will send the packet to the device, and the device will throw it away because it doesn't know what to do with it. (E.g. in the case of TCP, there is no socket matching the source IP and port, and even if by some miracle, there is a matching socket, the Sequence Number will be off.)
There are some protocols out there that allow a device to communicate a changing IP address, and there are some other protocols out there, that allow a device to keep an IP address across multiple networks, but neither of those are widely deployed, and regardless, that would change the premise of the question.