HiRes Screenshot with Mask Enabled is having green background

I am trying to take screenshot in runtime when i am taking in runtime background is green.

if i do it manually what you said is working fine