Thanks, that rules out any hardware issues. Is this the S Pen that came with the tablet?
Also, have you tried the tablet in Safe mode? To do so, turn the tablet off > When you turn it back on, press and hold the Volume Down button until it starts up. The tablet will indicate when it is in Safe mode. Check here if you have the same issue.