With volumetrics, objectID and materialID will still be assigned to the faces of the object…
You may try for example:
-to render the object in a separate layer and use it as a mask.
-or if it’s intensity is high, apply the glow just to bright pixels.
sure there are more ways to get it work, but not with the IDs.