Folding in XML is entirely indention based. So folding may end one line above the end tag. Including the end tag in the fold could cause other issues e.g. if the line contain another start tag.
In HTML some tags are named and the end tag is included.