I applied a mask modifier to a sphere object. When I preview the render, the object is visible with the mask showing correctly:
However, when I render the scene, the object is invisible:
Not sure if I should apply the modifier or not. I made sure the object was visible in ray visibility and no other object is in front of it.
Also, when I don't render the modifier, the object renders correctly.