A. If the keyboard expands during online games, check if the game has a specific setting to disable the keyboard overlay. Some games allow you to adjust keyboard settings in their options menu to prevent interference.
B. As a workaround, you can try using a different keyboard app that is optimized for gaming. Look for keyboards designed specifically for gaming in the Google Play Store.