The issue was that the masks for the current frame would be rendered for a different frame. Unfortunately, we can't easily render masks for the onion skinned frames correctly at the moment. The fix makes it so that we render the mask only for the current frame. Pull Request: https://projects.blender.org/blender/blender/pulls/129878