As camera-shake in macro photography will be about the same as in any other kind of photography, the IS will work just as well.
I can confirm this for my 100mm f/2.8 L Macro IS USM
which I primarily use for portraits. As this is a different lens, it would still be possible that Canon went through the trouble to specifically deactivate IS in non-macro use in the 35mm f/2.8 Macro IS STM
.
This review from the-digital-picture.com does mention IS - but no limitation to macro-only. In my opinion, Bryan typically is very thorough with his reviews, so I would imagine that he would mention such a heavy limitation in use-cases.
The lens's manual states at page 9:
The shorter the subject distance from the camera, the lesser the Image Stabilizer effect will be. [...]
Also, the Image Stabilizer provides image stabilization depending
on shooting conditions (such as shooting still subjects, following
shots, and close-ups (macro)).
So actually, it will work even better in non-macro distances (as there is more room for error - a few µm will not be noticed at 3m distance).
Lens stabilization in this lens will, most certainly, work with all kinds of photography at full 4 stops in ideal conditions. This should apply to all macro lenses with image stabilization - though of course, any manufacturer could deactivate it for whichever reason they want. That, however, would definitively be noticed by users - and we would know for sure within days or weeks of the release of such a lens, as nobody likes their lenses with artificially limited functions.