According to Google, Gboard uses Federating Learning to train a model on user data on the local device, so no sensitive data is not sent to the server. Only the gradients are sent and aggregated on the server. https://research.google/pubs/pub47586/
Google has been pretty adamant for years that they don't use or retain your Gboard data, unless you're typing it into search or some Google product that gathers it there. Prediction is supposedly done in-app.