The element bascode is used to trigger insertion of items for syntax hightlighting of Basic code in help texts. This inserting is done by the help compiler in BasCodeTagger.cxx. When a file with such element is opened by the extension and then resaved, the element bascode is not preserved but deleted. Try it with the file \core\helpcontent2\source\text\sbasic\shared\03020104.xhp for example.
Confirmed. Also noticed that it didnt preserve the white space indentation in the paragraphs, as well as the 'localize="false"' attribute of the <paragraph> tag.
Confirming on 64-bit Linux. As pointed out by Regina in https://listarchives.libreoffice.org/global/documentation/msg18778.html, the XSL filter files have been updated in the bug 94057 and would need to be taken over to the extension. An alternative solution, though, could possibly be the following (see https://cgit.freedesktop.org/libreoffice/core/tree/helpcompiler/source/BasCodeTagger.cxx): Instead of retrieving the content of the <bascode> tags, retrieve content of <paragraph> tags with role="bascode" attribute. See the http://www.xmlsoft.org/tutorial/ar01s08.html tutorial of the used LibXML for how attribute values can be retrieved. Because as is, the BASIC example code currently uses both, the <bascode> tags (for syntax highlighting) as well as role="bascode" attributes of <paragraph> tags (for style), which seems redundant.
Helpauthoring extension is deprecated. closing wontfix.