I am not sure what the story is with Occulus. But the Gamepad instance changes when exiting then re-entering presentation mode. The timestamp is different which can be detected.
A new gamepad instance is required to be updated. I have tried to modify myself but it's not detecting button changes when updating to it yet. I haven't uploaded my tests with a working example yet.
Something like this could detect the change and either update the gamepad or disconnect the controller.
if (this.controllers[ i ].gamepad.timestamp !== gamepad.timestamp) {
In GearVR / Daydream taking off the headset does not dispatch a deactivate event to possible manage gamepad disconnection that way. Only exit presentation events would work.
I guess it has to be disconnected and reconnected ?