With the latest updates of the Android version of the keyboard Gboard received a «floating» mode.
It is activated from the extended menu in the top left corner of the keyboard and allows you to «undock» the keyboard from the usual position in the lower half of the display. The keyboard window allows you to change its size and can be placed in any part of the screen.
It may take some time before the «floating» mode will appear for all users of the stable version of the application. Impatient users can take part in the program testing unstable builds Gboard.