When using a custom keyboard set via UIResponder.inputView, a gap appears between the text field and the custom keyboard after rotating from portrait to landscape and back to portrait.
On a portrait screen, when switching to a custom keyboard:
The input field at the top and the custom keyboard below it appear normally, with no empty space in between.
When I rotate from portrait to landscape, a gap appears in the middle.