Steps to reproduce:
- create a page with an extension tag for which VisualEditor does not have special logic, (e.g. <templatestyles src="Foo">xxx</templatestyles>)
- edit the page in VE
- click on the extension tag (<> icon) then the Edit button
- delete the content ("xxx")
- click on "Done"
The extension tag will be removed. While there are extension tags for which an empty content is conceptually the same as the tag not being there at all, this is generally not a safe or reasonable assumption.
See also: