XIAO ESP32C6 using MicroPython - the external Wakeup Pin is broken after DEEPSLEEP

Do you mean that after the device wakes up, the function on the D2 pin is no longer working?

We’ve seen a similar case before. You can try switching to another pin to test whether the issue is related to D2 specifically.