I found a mod that stops the vampire attacks on the cities and villages altogether:
This is a quick fix for the annoying vampire attacks killing the
townspeople in the Dawnguard DLC.
The mod will add an amulet called "Ancient Vampire Repellent". As long
as you wear this amulet, the timer for the next vampire attack will
continuously set to the far future. When you take the amulet off, the
timer is set as if a vampire attack just happened.
V2.0 will also disable the "Traveler"s and the wilderness attacks
while wearing the amulet. (The "Traveling Bard"/merchant/etc. and the
"Advisor" for the Dawnguard misc. quests are NOT affected by this. The
quests work fine. If some of these quests suddenly auto-advance, your
target was already killed by NPCs/Dragons/monsters/etc.)
Other options are these mods:
It makes most NPCs hide indoors when there's a vampire (or dragon) attack, instead of facing them head-on and possibly getting killed.
A small mod that makes citizens in a village or city run indoors
during a dragon or vampire attack.
This was born out of frustration at seeing the citizens all trying to
be a hero and rushing headlong to their doom attacking dragons and
vampires. Instead, the citizens will run to safety like smart people
should when faced with the horrors of giant flying fire breathing
lizards (or bloodthirsty undead). NPCs who live in the attack location
who own a home there will retreat to it. If the attack location has an
inn, NPCs who don't live there will flee to the inn, along with any
NPCs who live outdoors. If no inn is present the game picks a random
interior from the surrounding area and those NPCs will flee there
This should work for any NPCs added by mods as well, up to a limit of
150 in the area. After that, they're on their own. The NPCs chosen are
first come, first serve by the game engine.
Guards, members of The Companions, Vigilants of Stendarr, and the
player's followers/teammates will not run, they will stand and fight.
Farm animals will not run either, because they're stupid. That
includes your horse.
Vampires will be detected when the events that spawn them begin
Allows you to customize the starting conditions for various quests. You can choose to delay the start of Dragonborn, Dawnguard, or Hearthfire quests, as well as other quest events. Or you can also reduce the level requirements allowing a quest to start earlier than it normally would.
Unlike the one-off quests, most of the reoccurring world encounters will allow you to adjust their settings at any time. This is the case with the Dawnguard Vampire attacks. Even if you've already begun the Dawnguard quest, you can stop further attacks by setting this value to something higher than your current level. However, I've also included settings to adjust the frequency of the random vampire attacks, which can also be used to prevent further attacks.
Dawnguard: You can stop random vampire attacks from decimating the population, or allow the crisis to build by increasing the difference between the level at which the vampire attacks start and when Dawnguard recruitment begins.