Google does not need to know the IP address of your device. Instead, your device connects to Google, identifies itself using any protocol that Google uses for authentication, and Google uses this established connection to send notifications to your device.
When your phone changes from one IP address to another, it simply establishes a new connection with Google, and Google then uses this new connection for your notifications. Google doesnβt even have to keep track of your IP address after disconnecting, because as soon as you disconnect (for example, in a public Wi-Fi system), someone else can start using the same address.
source share