Arduino MOSFET touch switch
Your approach is deficient in several ways.

First, when you touch the pad with finger, you have huge AC signal coming in, 50/60Hz. When you release your finger, the gate charge can be left in any phase, positive, or negative. That's why your MCU reads low sometimes. More, huge AC amplitude likely stress the MOSFET input beyond voltage specifications, and some latchup occurs.

Second, it is very likely that your FET will be eventually destroyed by ESD.

To implement the idea of touch contactless buttons for various controls in electronic and household equipment, the Electronic Industry developed a special class of devices called touch sensors. They are not simple devices. Several semiconductor companies offer ICs that provide this function reliably. In many cases the touch sensor functionality is included in MCU directly. To get an idea, check this list on Digi-Key. This is a sample, directly for your application,