It therefore considers the three stones as dead, and cannot assign the white territory, since it’s not enclosed by “alive” white stones. Sadly this is a problem with the autoscore, since clearly neither the bot nor the opponent noticed this capture, thus both would’ve considered this to be alive.
There have been attempts to improve the scoring algorithm, and there are many ideas floating around, but it’s a pretty hard thing to do right, so I’m not sure when or how this will be solved. I have annulled this game for you, since it was misscored due to the autoscore misbehaving.
As for the second game, this is easier to prevent: the top white territory is not closed off, since there are still gaps at Q12 and K19:
It’s good practice to check all the borders of your and your opponent’s territory before you pass. In this game you should’ve closed your borders, or Black should’ve pushed into your territory before passing.
Territory is, as I said, open intersections enclosed by alive stones of one colour. Here the top territory connects to stones of both colours, so it cannot be assigned as territory, and officially counts as seki.
If you notice this happening in the scoring stage, you can resume the game to close the territory.