Sure… First up, how did you create the mask? did you create it off the backplate? if so you will need to undistort this mask output aswell… because its based off the same same camera.
Pretty much what the mask is doing, is its producing a black and white image… you are adding white over the image which is causing it to be like how it is… what you are wanting to use it for is to drive another operation… if you havea look at the alpha over… this puts your rendered image over the top of the background plate… you see that factor? when its 0, it doesnt do anything (transparent), when its 1 it is totally solid… now… black can be represented as 0, and white can be represented as one… this mask produces this information, but on a pixel scale instead of a image scale… so plug the mask directly into the alpha over and see if that helps (after undistorting the mask aswell). if needs inverting then invert it but i dont think thats needed.