HidD_GetAttributes should generate no USB traffic; it just returns information collected during enumeration. However, if the device has, for example, failed to respond (even with NAK) to interrupt IN token packets, Windows may stop trying to communicate or may reset and re-enumerate. When you get the error, if possible, see if the device is present in Device Manager.
Are you calling HidD_GetAttributes repeatedly for a different device each time or repeating the call for the same device? If it's the latter, why? If you increase the delay, does the problem go away?