I've had my computer (Thinkpad 11e running Windows 11) and stylus (ActivePen 2) for around four years, for some amount of that (unsure on timeframe) my stylus has had significant struggles with, well, actually acting as a stylus. Its touch wouldn't properly register to the screen, it kept disconnecting, all that stuff. I tried basically EVERYTHING I could find online to fix it but eventually just kinda gave up because at least it did still work around half the time.
Well, a few weeks ago, I finally got sick of using Windows because it was causing me so much annoyance. I switched to CachyOS because I saw someone say it ran fast. It does definitely work better for me than Windows did but of course I don't have a ton of RAM so there's always going to be some expected stuff. What happened is I installed Bluetooth and a drawing program, pulled out my pen to test if I had Bluetooth working, and to my surprise it worked perfectly for the first time in ages.
So, if anyone else is struggling with this type of stylus, trying everything else to no avail, maybe consider that as an option. Probably just as a last ditch though or if you were already planning on switching.
Edit: Btw if you see a deleted post by me it's because this accidentally posted twice because I have a bad internet connection at the moment.