you are really sure that is a reset and not a undebounced input which executes an unexpected part of the code?
how is the BROWN-OUT RESET configure?

good luck