Fact: an identical digital audio stream sent via HDMI to the Surround Sound Processor is identical, no matter what device is bitstreaming.
Any difference heard is either due to the stream not being identical or to settings differences between the HTPC input and the Blu-ray input on your XMC-2 (Different speaker presets, trims, surround modes, filters, DRC etc)
The most likely is the stream is not identical - usually not the audio data itself but the flags within it that are set to instruct the decoder how to decode it.
A possible reason for the stream not being identical is that when you ripped the disc you removed the Dialnorm setting from the Dolby track (Even DTS has a similar flag, but it is infrequently used). The Audio track is the same as before but your XMC-2 is decoding it differently.
In mkvmerge software, the 'remove dialog normalization gain' checkbox is the setting that can be changed when manipulating mkv files but other AV processing/ripping software doesn't always do this transparently and may be doing something in the background without giving you the option.
Then, there can even be different Dialnorm flags in the Dolby core and the TrueHD extension, so one or both flags could be preserved or removed by the ripping software.
I'd like to think that all of these ripping pitfalls are deliberately introduced by the industry to make it more tricky for perfect disc copies to be made so that buying the discs and supporting the industry is more desirable, but that's an aside.
As video quality was also mentioned in the posts above, it's important to note that audio, including DTS:X and Atmos is a relatively small part of the datastream on a UHD movie and can easily be preserved bit-perfect in a copy on a hard drive.
Video is not preserved in a bit perfect way, even on the discs themselves, and your "backups"/rips are further compressing this data using lossy techniques. No-one "backs up" their discs to a 50-100GB mkv!
UHD discs contain up to 100GB of data and even then the video data has had lossy compression applied by the studio to fit it onto the disc. (Raw 4K movie data is in excess of 112GB per hour!)
Fact: The best version of the video file, with the least artefact or colour or motion or image defects, is the one on the disc (or a raw direct copy rip of course (50-100GB for UHD!)) but it is still not perfect as the studio has compressed it once already.
Any subsequent remuxing or file compression using Handbrake or ffmpeg etc is selectively removing further detail using a second layer of lossy compression over the original lossy compression applied by the studio.
How this is done affects the video quality at the end of it and different software and hardware will also affect the quality of the playback as this signal is decoded and output as sequential still frame images.
MadVR cannot resurrect detail lost from a compressed rip to make it look better than a well decoded video file from the disc. It certainly could feasibly decode a raw rip better than the hardware decoder in your blu-ray player, but then who is storing 50-100GB mkv on their hard drive?
If you have a Blu-ray player with poor hardware decoding ability, then a 50% compressed rip done well by Handbrake with MadVR decoding could easily produce an image better than the poor hardware, despite the twice-done lossy compression that MadVR has to work on.
Back to the original post however - with audio, this is not the case. Lossless is lossless and as long as the decoder in the XMC-2 is receiving all of the audio stream, including flags etc, intact, the audio is identical in every way.