This happened to me after a firmware update. I have got iPad mini 5 and an Apple Pencil 1.
Combing the internet turn out a few suggestions:
- Turn Bluetooth on and off
- Make the iPad forget the pencil and reconnect
- Try to reconnect by tapping on the Pencil in the Bluetooth searching list instead of the dialog
- Re-tighten the tip
The combination of the above works only intermittently.