Clearly, your Pencil is successfully pairing with - and charging from - your iPad.
This leaves two potential sources of difficulty - these being an issue with the Pencil transducer that interacts with the iPad screen hardware - or iPad App software.
If in previous attempts to diagnose difficulties with the Pencil (including changing the replaceable tip) have been unsuccessful, ot is very possible that the metal transducer beneath the replaceable tip may have been damaged. Damage can occur if the Pencil tip suffers an impact, or excessive lateral pressure.
When replacing the Pencil tip, ensure that the replaceable plastic pencil tip is screwed firmly (i.e., finger tight) into the body of the Apple Pencil; even a slightly loosened tip will cause issues. When correctly positioned, there should be a tiny gap (around the full circumference - of about the thickness of a sheet of paper) between the tip and the body of the Pencil.
If the transducer has suffered damage, the only remedy is replacement of the Pencil. Substitution with another Pencil will confirm or exclude a positive diagnosis. A visit to the Genius Bar at your local Apple Store will provide opportunity to test your Pencil with another iPad - and your iPad with another Pencil.
Genius Bar Reservation and Apple Support Options - Apple