I’d get it done when the old roof is off and before the new one goes in – access will be a lot easier so you’re far more likely to treat it all (including the face of any wood with the roof resting on it and if any of the wood is too badly damaged by worm it can be cut out easily.
Also, if the roof’s off the chemicals will dry more quickly and the house won’t smell so bad.
I guess the roofer will be using paslode type nail guns but once the first membrane is on it should be fine, surely?
Also, I suspect the roofer want’s to do his work all in one go, not strip the roof and go away for a day or two while the woodworm’s done.