Hello!
If I'm not mistaken, then the actual elements that are in the module file must have the same layer name as the one you are turning off in your masterplan file. This can be achieved either by moving all elements in the module file to a single layer with the same name as the module-layer is in the masterplan file or by creating the layers inside the module file also in the masterplan file and then switching them off in the masterplan file.
Sorry, if I've got it wrong - haven't used AC12 for a while now but I remember it working this way in either 13 or 14.
Running ArchiCAD 23 INT.