One way is to use a second viewport (similar to a render target). You can render just the mask object (with a solid color, or even just a full color, but with the background set to like black or white and then all other objects hidden via cull masks). Then read the texture from the second viewport and pass that in as a uniform to the real shader. Then you can mask out the object, without interference from post processing effects.
Just note that this is an expensive operation. Viewports are pretty slow in Godot. You can probably have 2 or maybe 3 at the most before it loses too much performance. In some cases, you can render the second viewport as a lower resolution, and this works for effects like mirrors and portals and stuff. But for a mask you want pixel perfect and the blur can create strange halo effects.