Yep, the math is pretty dreadful from the get-go.
DC13 Sacred flame vs Dex12 goblin equates to 55% hit chance for 4.5 damage, which can't crit. BG3 doesn't implement cover, so that part of the spell is irrelevant. I suppose spells like Web that impose Dex disadvantage help the spell.
At 10th level+ it can get good if you're DC hits around 20 and you get a heap of riders. Then again, so do all the other cantrips.