Transformation has broken link between images and masks

I am trying to augment a dataset. I have a dataset of images and masks that match.

I run the following code and the masks are no longer matched with the images.

What is going on?