Afaik as long as it’s not PII (personally-identifying information) you should be fine.
Many other locales say the same:
California Consumer Privacy Act: https://iapp.org/news/a/are-ip-addresses-personal-informatio...
Canada PIPEDA: https://www.priv.gc.ca/en/privacy-topics/privacy-laws-in-can...
UK ICO: https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-re...
According to your link: "Personal data relating to GDPR does not cover: ... Properly anonymized data ..."
So OP might could hash the ip address (something better than md5, ideally) and save that.
Hashing, possibly with a secret salt, is sufficient.