A very good question which I don't know the answer. But what I do know is that since IP addresses are considered personal information, then you can tell the GA script to anonymise it.
https://support.google.com/analytics/answer/2763052?hl=en
Of course, that doesn't stop that IP address becoming aware to the GA servers, but they should stop it being used further down the line.
I suspect it's similar to using a CDN where the IP address again is passed to a third party.