Until this bug is fixed.

The ONLY workaround I have been able to find is to:

Generate the class with clearing the checkbox for the undocumented option
“Serialize XML AnyType struct/array members as strings (uncheck for legacy behaviour).”

Which as far as I can see actually should read “Render XML and return Struct (uncheck to return XML handle)”.

Then manually render the XML...

So no fun, but when you are stuck...