Google Analytics drops the last octet IIRC. Hashing isn't anonymizing because the hash can later be used to re-identify a user. (See https://ec.europa.eu/info/law/law-topic/data-protection/refo...)
And then hashing the IP addresses would be such a reasonable step, too, since it removes location information from the stored data.