Slide to type. This "issue" is at most 6 years old for iOS users.
Turn off slide to type if you do not use it. Slide to type does key resizing logic. This is the direct cause of this issue. Please upvote this comment for visibility.
Please reply if you think I'm wrong. I see this get posted frequently enough I'm actually losing it.
Please refer to https://youtu.be/hksVvXONrIo?si=XD7AKa8gTl85_rJ6&t=72 (timestamp 1:12) to see that slide to type is enabled.
It might be different with slide-to-type enabled, but the iPhone always invisibly resizes keys hitboxes using predictions about what key you want to use next. This can't be disabled, and has been part of the iPhone since the very first. It's a really abysmal experience for something that's so crucial to a smartphone, Apple seems to be completely disconnected with how people use these.
Apple even used to advertise this on their own site. That video definitely exists somewhere on YouTube.