I had the same thing happen and I though it was the battery but found out it wasn't. By the way those AAAA batteries are hard to find Walmart doesn't carry. I found at Walgreens and Batteries Plus.
It would stop working after a while and I would delete it in Bluetooth and then it would connect and work a couple of days. When then one day it would should in Bluetooth it was connected but the pen didn't work so I kept connecting and deleting until finally it told me the Pen bluetooth driver was corrupt. So i went to the device manager and deleted Surface Pen under Bluetooth devices and clicked search for new hardware. It found the pen and installed the new driver and I haven't had any trouble the last month and I use the pen all the time.