Cant apply both 2 independent transform to image and binary mask

If you want to apply the same “random” transformation to the data and target, I would recommend to use the functional API as seen here and to avoid depending on the seeding.