This seems to just be the shape of keyboards (both system and custom) in iOS26, so it is working as intended. This is not a gray bar at the top of the keyboard, it is the entire rounded background view of the keyboard and your content is inset vertically inside it.
The idea is that your keyboard (or custom UIInputView) has a clear background, and therefore seamlessly shows the system's rounded background view. If you remove the white background of that top section in your keyboard, then it will look correct?
Topic:
UI Frameworks
SubTopic:
UIKit