Keyboard problems

Hello everyone! Sorry that my first post had to be me asking about a problem but I can't find a way to fix it. My keyboard is acting a little weird right now, as it keeps increasing in size after I add a period to my text. Here is what it looks like normally and then after I add a period:

Does anyone know a solution to this problem? A little more info about the keyboard:

Standard Android Keyboard (AOSP) that came with the phone
I haven't changed any settings that involve the keyboard (at least not intentionally), this includes font size.