Recent updates to my IRLib2 Library for Receiving, Decoding, and Sending Infrared Signals have fixed long-standing problems with support for SAMD51 based boards. In addition to support for Adafruit Metro M4 we now also support Adafruit Grand Central M4 and Adafruit Feather M4 Express.
The code can be found on GitHub at https://github.com/cyborg5/IRLib2.