Same issue here. Pencil does not function after I attach it to the iPad pro, only when it is also attached to the magic keyboard.
Disconnect the iPad from the keyboard, pencil works again. If I then reconnect to the keyboard, the pencil works until I reattach it magnetically to the iPad.
15.5b4