MKR NB1500 needs USB connected to execute code?

Hello,
I am using a NB1500 board to send sensor data over MQTT. The data transmission works just fine, and I have a custom GUI that displays this data.
The problem is that everything stops working when I am using an external power supply to power the board through the VIN pin.
It looks like the code works in all of its functionality only when the board is powered through USB.
There is no serial port check in my code which rules out the possibility of the board possibly getting stuck waiting for a Serial connection.
Has anyone faced similar issues or has any idea what could be the problem?

It should work, it does on mine. Are you using any type of carrier board or just the NB1500?

Do you have a battery connected? The NB1500 has connection issues if there is no battery connected to it.