Many require internet permission although it makes no sense. For instance all Google keyboards have internet permission. And most others. That something that can record and transmit every single thing one types has that permission, to me, seems insane and I certainly will use only keyboards that do not have such asinine requirement.
For example, the app could just open the browser set to http://myapp.com/?secretdata=Ultramanoids_password
How are you going to stop that? Have the browser stop and ask before loading the web page?
There are also a bunch of ways of doing it in non-visible ways by using API's of other apps
Otherwise, open source and on F-Droid there's AnySoftKeyboard [2] and even a build of Mozc [3], this last one unfortunately with internet permission.
[1] https://play.google.com/store/apps/details?id=kl.ime.oh
[2] https://f-droid.org/en/packages/com.menny.android.anysoftkey...
[3] https://f-droid.org/en/packages/org.mozc.android.inputmethod...