Are the files that open differently detected as the same mime type?
XML is used for lots of things, and the mime type detector can tell them apart from the contents, there is not one "XML" type, see [here](https://en.wikipedia.org/wiki/XML_and_MIME). And each mime type can have a different opening command configured.
If they are different mime types they may have different geany commands configured?