Masking during weight painting is bugging? Or am I doing something wrong

Hello, I have a question. I got used to using masking a lot during all kinds of paintings, like vertex painting and so. But in weight painting it is bugging. When I mask a thing and then click with a brush, the masked thing reappears. Am I doing something wrong? Could you confirm it is the same for you so I can report it to the Blender devs? Thank you!
weightpaintingproblem