Instead of using Keynote to perform the masking, I prefer using a dedicated image editing application to do all the retouching. It’s a quicker and simpler method than using Keynote and achieves a pixel to pixel accurate image in Keynote.
Try the workaround:
1
Before using Keynote, edit the original image in your image editing application for colour correction, levels, contrast, also crop the image in this stage, instead of masking in Keynote.
The inbuilt Mac Preview application works perfectly for this, or use your regular software; Photoshop, Pixelmator, Affinity etc
Save As a new image file with a new name
2
Insert the cropped image file on to a slide in Keynote and size and position it. (No masking required)
Select the image on the slide and define as a Media placeholder:
Format > Advanced > Define as Media Placeholder
Save As a new Keynote file and play
3
When changes are required to the same image, open the cropped image in your image edging application and make the required changes for colour correction, levels, contrast.
Save As a new file with a new name
4
Using the Finder, drag the edited image file directly onto the media placeholder on the slide.
Save As a new Keynote file and Play