Hi - I know you already tried forgetting device and restarting iPad, I tried that several ways and it didn’t work for me either, but when I did it a very specific way, it finally worked. I’m not sure if all of these steps are necessary, but try it.
1) forget Apple Pencil device under iPadOS settings—>Bluetooth
2) Turn Bluetooth off, then ON again. I Don’t think it matters if pencil is attached or not, but feel free to try it either way.
2) set pencil on magnetic surface of ipad if its not there already (it might say “Apple Pencil” but no charging percentage, thats okay). Make sure you leave it there for a few minutes just in case its charging without you knowing it.
3) turn off iPad by holding top button and volume up side button then sliding the screen button slider to power off.
4) turn iPad back on by holding top iPad button
5) For me, after putting in my passcode, the iPad recognized the pencil attached and the indicator finally said “40% Apple Pencil” and it worked again.
I was close to buying a new one due to all the reports of lithium ion battery irreplaceability and other instructions not working for me. Glad i didn’t.