Masking does not change the wall. It changes what the listener hears on the other side of it.
Compact maskers fitted in the ceiling of the receiving space (the corridor or adjacent area) produce a calibrated broadband signal tuned to speech frequencies. At the level we typically install, between 38 and 40 dB(A), the masking pushes overheard speech below the threshold of intelligibility. The exact level depends on the office and can be lower.
People inside the room are unaffected; people working outside it stop registering the masking within a few hours, and most visitors never notice it at all.