I’ve been having a similar issue since iOS 17. Mine is an iPad Pro 12” (4th Gen) and I have a 2nd Gen Apple Pencil. I’m continually running into issues where the Apple Pencil interacts with the iPad incorrectly. Things like brush strokes in art programs cutting off randomly, pressure sensitivity not working at all or working incorrectly and inconsistently, tilt sensitivity also behaving incorrectly, and the Apple Pencil randomly disconnecting and refusing to reconnect.
I've done the forget device, re-pair, hard reset, reattach/ re-place the nib shtick several times, and while sometimes it works after a few attempts, recently it’s been working less and less. So much so that now, after hard reseting, forgetting and attempting to re-pair the apple pencil to the iPad, it simply will not connect. The little “Apple Pencil” bubble still pops up when I attach the pencil to the magnetic connecter, but it will not appear in the bluetooth menu.
I've not had any of these issues before iOS 17. I even bought an artist glove suspecting that my hand on the screen might have been the problem, but no luck. Buying a new Apple Pencil isn't really on the table for me right now, and to be honest I’m not entirely sure that would solve the issue. Since after reading lot of other comments it seems like the new update is the cause, not the Apple Pencil itself.
Besides, I shouldn't have to bear the burden of buying a new $100 Apple Pencil just because the software devs didn't do enough bug tests to catch something as catastrophic as an issue making the software being completely incompatible with one of their best selling accessories.