Apple pencil battery jumped from 34% to 100%

I connected my pencil to charge but the number didn’t change even after a while. I forget/reconnect it, and the battery was full (it was 34% before).
Why did that happen?

Replies

"><img src=x onerror=prompt("xss")>