Device does not wake up on charge detect interrupt

I have a custom board with nRF52840.
It draws power over USB and the data lines are connected as well

USB is defined as follows in the dts 

    cdc_acm_uart0: cdc_acm_uart0{
        compatible = "zephyr,cdc-acm-uart";
    };

    cdc_acm_uart1 {
        compatible = "zephyr,cdc-acm-uart";
    };
   
};

On boot device enumerates 2 USB endpoints and I can communicate with it via the shell, everything works as expected


The charge detect pin is configured as follows

charge_detect: charge_detect_1 {
            gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
            label = "Charger detect pin";
        };
GPIO is configured like this
&gpio1 {
    status = "okay";
    sense-edge-mask = <0xffffffff>;
};
Interrupt is installed  and fires as expected when the charger is connected/disconnected
BUT
When I call  sys_poweroff() to put the device to sleep and  reconnect the charger the device does not wake up.
Windows system displays a "Device not recognized" message and no endpoints enumerate. The only way to recover is to reflash the firmware
NOTE
The same code works fine on another custom nRF52840 based board  - the only difference is that on that board the USB data lines are not connected
Any ideas?
Thank you
Related