The mask image probably cannot have alpha data. But since all the information in your mask is in the alpha channel, then you can just extract the alpha channel and use it as a mask.
convert background overlay \( mask -alpha extract \) -composite result
note if on windows, leave off the two \
If you get the wrong masking direction, then add -negate after -alpha extract.
This would go a lot easier if you would provide links to your three images!