Using MCUXpresso 11.3.0 and SDK 2.6.0 for RT1010 and SDK 2.9.1 for RT1020 I have built the SDK example dev_composite_hid_audio_unified_bm on the evaluation boards for each MCU. This example will build and function correctly on Windows 10. I have tested on Windows on both debug and release builds. Release builds I set anything other than -O0 (no optimization) and the USB audio device is not enumerated at all on Mac while working correctly on Windows 10 using the same firmware.
Interestingly enough the speaker only audio example in the SDK does work on both Windows and Mac. The RT1020A silicon has errata regarding USB:Endpoint conflict issue in device mode which is unrelated to this optimization bug.
Seems like something is getting optimized out of the usb_device_ehci.c file as I can optimize -O3 the entire project except this file and things continue to work if I optimize this one file file -O0. Otherwise the Mac ignores the device completely.
This seems to indicate that the code path being taken by the firmware is different between Windows and Mac on initial insertion of the USB cable.
A work-around is to just optimize usb_device_ehci.c -O0 when building release builds. I will scrounge up a USB analyzer at some point, but wanted to report this bug.