Thanks to Dan's assistance, I managed to get the Trinket M0 to work with webusb on makecode.

I re-built the Trinket M0 bootloader that has webusb support by cloning https://github.com/adafruit/uf2-samd21 and do make BOARD=trinket_m0Then just drag the generated update-bootloader-trinket_m0-v1.23.1-adafruit.2-22-gae5806e.uf2 to the Trinket M0 in windows (via USB) and that updated the bootloader.