When one would like to create an Elastic Container Registry then it is possible to set 'image tag mutability':
Image tag mutability
The image tag mutability setting for the repository. Select "immutable" to prevent image tags from being overwritten by subsequent image pushes using the same tag. Mutable Immutable
According to this user guide it does not seem to be possible to configure this using AWS CloudFormation.