These sorts of games are either direct clones of, or based off the mechanics of a game called Qix, a puzzle game originally released in arcades. Therefore, "Arcade puzzle game" would be the appropriate (but not very useful) genre.
A more useful definition might be "Qix Clone" or "Qix-like" - these are the terms you probably want to search by if you're looking for games with the same or similar mechanics of the original.
Note that some Qix-like games may alter the gameplay somewhat, while maintaining the core mechanic of enclosing areas and not getting hit. Frenzy (1984), for example - enclosing an area will capture (remove) enemy units instead. Removing all enemies OR enclosing 95% of the board will complete the level.
I am unfortunately obliged to give a content warning: some of the cheaper/modern versions of Qix have an erotica component, where enclosing areas of the board reveals a risque picture underneath. Just something to bear in mind.