The M-key requires that the specific mask “has focus” - otherwise, nothing happens when the the M-key is pressed … which as @SAFC01/Paul and others have noted, can be confusing.
Whereas, the Mac-style Mask-on/Mask-off button combines both assignment of focus and activation.
Personally, I’m not bothered by the Win-version behaviour; it works as I expect it to … but, that explains the difference between the Win/Mac implementations.
John M