https://www.laserax.com/blog/data-matrix-vs-qr-codes
Looks like Data Matrix has higher error correction (per size) and better data density (at every size). QR Code has a higher theoretical storage capacity, larger maximum size, and multi-byte data support (rather than limited to alphanumeric), none of which applies to this use case though. It also looks like that Data Matrix may work with a lower contrast than QR Code. Both can be read from any angle.
Honestly, purely from a technical standpoint, the biggest arguments for QR Codes is their popularity/adoption, and things like that you can stylize the code itself.
Maybe I need to do more research, but on the face of it Data Matrix looks like it is technically superior.