I wish they'd make it more consistent, but I don't think they will since they're following DnD rules. Sacred Flame is pretty much a love & hate cantrip for me

Love it because it's fun and looks cool and feels satisfying when it actually hits, but hate it because it lands once every full moon for a laughably pitiful damage.
Even when giving Shadowheart
20 Wisdom along with
The Shadespell Circlet and
Melf's First Staff which gives her more accuracy for Sacred Flame, it's only good for squishy NPCs with terrible DEX.
The only way I somewhat compensate for its terrible inconsistency is by using Karlach with a
Sussur Greatsword and
Boots of Stormy Clamour. The sword triggers Silence, from which the boots then
Reverberate the target to drop DEX by -2/-4, which lowers it somewhat enough for Sacred Flame to have between 75-85% chance to succeed.