When an enemy is near death (or even otherwise) and standing close to one my characters, the enemy will sometimes walk away (either to gain distance or to attack another character). This generates an attack of opportunity (for my characters) that can end up killing the enemy.

Could the enemy choose instead to not open himself/herself to an attack of opportunity, by not moving away? At least at higher difficulty levels (i.e. "tactician")?

That would be for fun for me.