Yes (I believe) - although I've not tested it .
I believe the 34t cog will be tapered so it sits further inboard, as it sits higher the spokes are further away than at the 28t cog height so it can afford the space to taper.
Hence why the 34t cassette would have a narrower spline fit, but with the same spacing and cog width, and therefore need a spacer on the road Freehub.
Again not tested...