AD8222 single supply EMG
Take a peek at figs 7 and 8 in the data sheet.  for +/- 5V supply, the common mode input  voltage cannot be less than about 4 volts.  I suspect that with your 4V supply, and ground as the negative supply, you can't get within 750 mV of ground as a common mode input.  While it may operate single supply, it is not rail to rail on the input.

The fact that there is no equivalent to figs 7 and 8 for single supply operation suggests that this is not a very good choice of an instrumentation amp for a single supply emg.  I don't know any rail to rail dual package, but suggest you peek at the AD623, which actually works for a common mode voltage a bit BELOW the negative rail.

If your output is stuck at Vref, that would suggest that if it were grounded you'd be stuck at the negative rail.  You don't say the size of the sine wave you're using as input, but I suspect it's less than a volt, and below the valid range for common mode input given single supply use.  Try putting in a DC 3 volts and see what happens.

Also, that's not how you use a reference terminal on an instrumentation amp.   You offset the output stage by providing a LOW IMPEDANCE reference voltage, usually the output of an op amp.