Looking at both there isn’t much in it overall.
I think the Sonder is claimed a bit lighter, has a slightly slacker head angle and comparing medium with medium the reach is the same. Sonder has slightly longer chainstays – I reckon overall it might be marginally the more stable at higher speeds.
Fork wise the Pike on the Boardman is a ‘select’ – so that’s not a full charger damper with the bladder – it’s an ifp arrangement in the stanchion. So it’s a bit better than the damper in the Yari – but not a huge game changer. I’d prefer a Yari on a 29er for the more sturdy chassis and if I wanted a better damper I’d retro fit one in the Yari at a later date. Either a full charger 2 or something like a Novyparts Splug / Fast ‘YariUp’.
Brakes and groupset are almost identical.
Wheels – difficult to say but I think the Sonder has the edge.
Overall I’d take the Sonder – as well as having marginally better stuff for the most part it looks nicer. I’ve had a few boardman bikes before and they were decent enough – but the mtr has an ugly frame 🤮
That said – there’s a massive wait for the Sonder – order in November for March / April delivery. I’ve assumed you were comparing the SLX Evol build.