Ok, I though u had permanent damage like guys on XDA were crying about a year ago. It is probably the magnet pulling away the electromagnetic field that powers the S-Pen. I remember back when I was 8 years old, I took immense pleasure in using a magnetic security wand to mess up a Skype call from 1-2 yards away when my father was Skyping my grandparents on crappy WayPort WiFi. The result was lower quality video/audio. Same exact situation happening to you and your S-Pen, since the S-Pen is getting zero power in the affected area. The reason why you don't need to charge (major fail for Apple's rechargeable Apple Pencil) or put batteries (HTC Flyer pen took a AAA battery) in your S-Pen is because those coils behind the screen wirelessly send juice to your pen via an alternating magnetic field (kind like the signal that powers RFID tags in passports, but on steroids). Think of it as an air-core transformer. The primary (input) is the coil(s) behind the screen, and the secondary (output) is the reception coil in the actual pen. Put a strong enough magnet behind the primary and that electromagnetic will NOT reach the secondary.