This is not an issue in Raw Gadget, but rather an inconsistency within the Linux kernel USB Gadget subsystem. It was discovered while investigating and fixing #45.
The proper solution to this issue would be to contain USB_GADGET_DELAYED_STATUS within the composite framework and make all UDC drivers to not complete the status stage for 0-length requests on their own.
Unfortunately, there is quite a few UDC drivers that need to get fixed and the required changes for some of them are not trivial.
This is not an issue in Raw Gadget, but rather an inconsistency within the Linux kernel USB Gadget subsystem. It was discovered while investigating and fixing #45.
Quoting the related Linux kernel commit: