Have you enabled the Scribble feature? This feature uses a different mini-keyboard that does not respond to the two-finger zoom or pinch gestures.
Settings > Apple Pencil > Scribble - set to OFF
After disabling Scribble, you may need to force-restart your iPad:
Force restart iPad (models with Face ID or with Touch ID in the top button)
If your iPad doesn’t have the Home button, do the following:
- Press and quickly release the volume button nearest to the top button.
- Press and quickly release the volume button farthest from the top button.
- Press and hold the top button.
- When the Apple logo appears, release the top button.

Force restart iPad (models with the Home button)
Press and hold the top button and the Home button at the same time. When the Apple logo appears, release both buttons.

Otherwise, to restore the new Floating Keyboard to the normal on-screen keyboard presentation, use the two-finger “zoom” gesture (i.e., the reverse of the two-finger “pinch”).
If the Split Keyboard is restored instead of the full on-screen keyboard, you can either use two fingers (one on each of the two half-keyboards) and swipe the two halves together - or touch-and-hold the “keyboard” key, then slide your finger to the Merge & Dock option and release.
Use the floating keyboard on your iPad – Apple Support
Split and move the keyboard on your iPad – Apple Support