Open Device Manager >Expand Bluetooth > Find your pen
Right-click → Properties > Go to Power Management
Uncheck: Allow the computer to turn off this device to save power
Also do this under:
Human Interface Devices → HID-compliant pen
Go to Settings → Bluetooth & devices > Remove the pen > Restart your PC > Re-pair the pen
Go to HP’s official support site
Install latest Bluetooth driver
If already latest → try rollback from Device Manager