Getting SDL_JOYDEVICEREMOVED when I shake DS4, do you know why?

Hi I’m having to do quite a lot of work to try to patch around the problem of the system being sent this signal/event when shaking the DS4 controller.

Does anyone know why this is getting triggered?

Cheers, Fred