iOS keyboards given “full access” in settings can see literally everything you type. That’s why I don’t use GBoard on my iPhone, also why I don’t enable “enhanced spellcheck” in Chrome.
It's behavior is no different from Windows 10 telemetry. The keyboard does not even work if you disable one of the underlying telemetry services in the app (if you have a rooted device).