Village_Idiot
Banned
Possibly. It is more likely another app causing it. Without knowing what apps you have installed it's kinda hard for us to help troubleshoot.
Try resetting app preferences:
Settings -> Apps
Tap the ellipse in the upper right and tap "Reset app preferences."
That resets all of your phone's apps back to default and may even log you out of them. It doesn't delete app data (at least I don't think it does).
After resetting app preferences, see what your S Pen does. If it behaves like it should, then start resetting up your apps and testing your S Pen after each one. It saves you having to do a factory reset.
Try resetting app preferences:
Settings -> Apps
Tap the ellipse in the upper right and tap "Reset app preferences."
That resets all of your phone's apps back to default and may even log you out of them. It doesn't delete app data (at least I don't think it does).
After resetting app preferences, see what your S Pen does. If it behaves like it should, then start resetting up your apps and testing your S Pen after each one. It saves you having to do a factory reset.