The binary format used by XmlDictionaryReader and XmlDictionaryWriter is supposed to be always little-endian.
However, the current code does not implement this correctly when running on big-endian systems. These pre-existing problems were recently exposed by additional and updated test cases added here:
#73332 (XmlDictionaryReader)
#71478 (XmlDictionaryWriter)
See #73332 (comment) for more details.
@jkotas @Daniel-Svensson