Clearly your Pencil is successfully pairing and charging with your iPad. As such, you can safely exclude all thoughts of your Pencil being incompatible with your model of iPad, or any issues related to pairing and/or Bluetooth communication with the 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 software. Given your extended description, the latter can be similarly excluded.
If in previous attempts to diagnose difficulties with the Pencil (including changing the replaceable tip) have been unsuccessful, the metal transducer beneath the tip may have been damaged. The transducer element is relatively fragile - and if damaged, may provide inconsistent performance, if it works at all. If the transducer has suffered damage, the only remedy is replacement of the Pencil. Substitution with another Pencil should definitively confirm or exclude a positive diagnosis.
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.
A damaged or broken transducer element is unrepairable - the only remedy being replacement of the Pencil.