Custom block automatically adds code when edited in admin
The data-entity-type &amp; data-entity-uuid properties are added with  WYSIWYG fields when you have the Track images uploaded via a Text Editor filter . This filter is designed to track usage of images as they are dropped into HTML body fields and update the fields accordingly when the image is updated.

To disable it, navigate to the Text formats and editors admin section and configure the format that's being used for your custom block. Untick the Track images uploaded via a Text Editor filter option and click the Save configuration button to disable the filter.