The question is a bit foolish: "Is [insert softkeyboard application here] basically a key loger?" -- well, the softboard
itself is the key
generator, if you want. By definition, it has control over all input. By definition it can do anything it wants with it.
If you don't trust Google, don't use Google software. A LineageOS installation doesn't come with the GBoard but instead the plain Android softboard which is the same without the fancy features (i.e. lacking Google search, image search, etc.).