The Maharal in Be'er HaGolah Be'er Shevi'i actually understands the account and concept of Beruria to be the basis for the prayer of V'Lamalshinim (see here in the R' Hartman edition, p. 419-421).
Therefore, the Maharal explains, each clause of the beracha is directed towards the nature of the evildoer, but not towards the evildoer himself:
״ולמשומדים אל תהא תקוה", שלא יהיה תקוה להם שיהיו עוד המשומדים במציאות, רק יסורו מן
העולם. ורצו לומר שלא יהיו עוד אנשים כאלו בעולם, רק יחזרו מן מעשיהם
"Let there be no hope for the meshumadim" - that they should not have any hope of there being meshumadim in existence, but they should depart from the world. Which means to say that there should not be any people like that in the world, just that they should turn away from their actions.
״וכל המינים כרגע יאבדו״, שלא תהיה דעת מינות בעולם, ואז יהיו נאבדים המינים מן העולם
"And all the heretics should be lost in a moment" - that there should not be any more mindset of heresy, and then the heretics will be lost from the world.
ואילו היה מתפלל ׳וכל המינים כרגע ימותו׳, היה משמע כי מתפלל על מפלתן. אבל לא אמר רק ״וכל המינים כרגע יאבדו״, היינו כי לא תהיה עוד דעת מינות בעולם
Were it that we prayed "all the heretics should die" it would imply that we pray for their downfall. But we just say "they should be lost," meaning that there should not be any more heresy in the world.
The Maharal continues line by line through the rest of the beracha with this approach.