Re: MCLR pin not resets the PIC32MZ
Are you sure that /MCLR signal is measured at the correct point? At the pin, not the switch?
As long as PICkit programming/ debugging tool is connected,
PICkit will drive /MCLR pin high, and override reset switch.
Resistor R1 = 1kOhm providing signal isolation.
You may try experiment with programming tool disconnected.