Arduino mkr wifi 1010 doesn't start with A1 connected to 5V pin

Hello, I have a problem with arduino mkr wifi 1010. I have arduino connected with lipo battery and I want to know when the board is connected with USB. So I connected 5V pin directly to A1 pin and reading A1 analog value I'm able to detect USB connection. But when battery goes down and I connect for battery recharge arduino doesn't start until I cut wire between 5V and A1. Did someone have same problem? any idea on how to solve it?
thank you in advance