Xiao nRF52840 project works when powered with 5V, not with battery or 3.3V

I’m not using Serial; I’m using the LEDs to show status. And it works without USB connected if I supply power on the 5V pin.