Normally I would suggest resetting either Gboard or the Pixel launcher but you already did a factory reset, the ultimate thing and still it persists.I can't draw any other conclusion than that this has to be caused by some 3rd party app.
First try this: swipe up on your home screen and go to the app drawer, tap in the search bar and tap the three dots top right, tap preferences. Check whether the first option 'Swipe up to start searching... [Always show keyboard...]' is disabled.
If it was: have you already tried rebooting into
SAFE MODE and check if it goes away.
To be complete: have you, by any chance, done anything special after the setup, e.g. enable developer options?