Magic vs Brawn
Willow could only beat Buffy if she started it, or had some way to distract Buffy. Magic in the Buffyverse usually seems to work slower than a punch in the teeth, which is as it should be. Also, Willow's magic is unreliable, so Buffy would have a good chance even if taken by surprise.
But watch the in-a-ruin episode in Season 5 to see how much tougher and more competant Willow is than Buffy. Watch all the different things she does. I don't want this to be a spoiler so I won't say more.
I'm sure that Willow could slay better than Buffy. A bit of magic to seek out vamps, then turn up in daylight and set fire to them. Or just set fire to them. They are very vulnerable to that. I don't know why Willow is obsessed with making a ball of sunlight, which sounds dangerous to me. Say you ended up with a handful of sun-type plasma? Goodnight sweet witch.
But we know Willow can set fire to things in an instant. So she stands just outside the fight, where all good wizards need to be, and takes out vamps as fast as she can say "Fiat lux" while the others distract them with stakes and stuff.
Although Riley proved long ago that no one with a phosphorus grenade needs a Slayer at all. As Buffy herself said, "That was then. This is now."