You can't output Magic Mask at render unless you create alpha output connection, connect to it and render at appropriate codec the mask itself.
So probably what you mean is rendering the adjustment, like exposure changes, limited by magic mask you have created.
What you describe in your post seems to be related to caching. You have essentially lost cache in one way or the other and that is why Magic Mask selection and tracking needs to be re-rendered to re-created the cache.
I don't know at which point cache was deleted or why, but there are several things you can do. Assuming the cache is lost, you can re-render the magic mask strokes which takes time and is no fun, but as long as the reference strokes of the magic mask are not deleted, they should be recreated and cache build up again. People have been having issues with magic masks and caching for a while now, either because they used wrong workflow and didn't know how to manage it or sometimes related to bugs etc.
In the future the safest way to save cache is to output masks or mats themselves as rendered masks. That way you have them rendered and as long as you don't delete them manually they can be reused on the same project, preventing any accidental deletion of cache or problems with bugs.
I use this format typically to render the masks from deliver page. Or if I use fusion for magic mask I do it via saver node.