A. Try to disable notifications for ads if the app allows it. Go to Settings > Notifications and see if there are options to limit ad notifications or pop-ups while typing.
B. If ads are persistent, consider using a device feature that allows you to switch to 'Do Not Disturb' mode while using the app, which may help reduce interruptions.