If you want to be able to prevent this in the Source view as well, just add this code to your plugin:
editor.on('key', function(e) {
var html = CKEDITOR.currentInstance.getData();
if (!html) {
return;
}
CKEDITOR.currentInstance.setData(replaceImgText(html));
});