however you should connect the ground side of the 12v supply direct to the junction of the mosfet source terminal and 1000uF capacitor, instead of via the mcu ground pins as you appear to be doing.
I'm using an old computer supply with both 12 and 5 volts with a common ground.
you've now broken the connection between mosfet source and Arduino ground
but just curious as to what could be causing this.
This is after an hour of wondering why the contrast didn't adjust at all only to find out the pin2 and pin 3 are swapped on my particular HD44780 compatible LCD (JHD204A - made in China).
now I find that contrast does nothing at all if I wire everything up as correct.
You probably burned out the potentiometer when it was wired incorrectly.