IP addresses of smtp.gmail.com from Google’s designated nameservers are …

Our firewall restricts outbound port 465 but allows outbound access to IP ranges within _netblocks.google.com, _netblocks2.google.com, etc. (as listed in the TXT record _spf.google.com). Recently we have seen some IPv4 addresses returned by Google’s designated nameserver for smtp.gmail.com which are not within these netblocks.

https://support.google.com/mail/thread/77689665/ip-addresses-of-smtp-gmail-com-from-google-s-designated-nameservers-are-outside-google-s-netblocks?hl=en