I have tried numerous meshes locally, including a simple cube, but imported meshes do not seem to respect the disableColorWrite material or onBeforeRenderObservable/After for masking another mesh.
I have a playground here:
https://playground.babylonjs.com/#Z3GIKS
Uncomment lines 52&52 or 56&57 to attempt masking with imported mesh.