If you dock the S Pen, then go to Settings>Advanced Features>S Pen, then tap the 3 dots at the upper right, you should be able to select Reset S Pen.
This will require service for the device. Please send the full model and serial numbers to this PM Link.
Please send the following information to this PM LINK.
Place of purchase:
Copy of Purchase Receipt:
First and Last Name:
Physical Street Address:
City, State, and Zip Code:
Home phone number:
Alternate phone number:
Preferred method to be reached (SMS, email, or phone):