Arduino does not execute code until hardware reset

Hi all,

I have a problem with an Arduino Mega2560. Last year I built a shield that received 24V and, using a 12V linear regulator, powered the Arduino via the Vin pin. Everything worked.
This year I made a new version to decrease power consumption, using a 5V switching regulator to power the Arduino via the 5V pin.
The power that I am experiencing is that when I power on the board the sketch does not start its execution until I manually reset the board short-circuiting the reset pin to GND. Furthermore, if I power the Arduino with the USB, everything is fine.

On the switching output I see stable 5.1V.

I really don't understand why this beaviour manifests, anyone has any hint? Thanks, regards,

forgot to mention that I already tried to add a pull-down to GND on the RX pin, without success…