The intermittent, unresponsive touchscreen issues with higher priced, larger screen iPad Pro and iPad Air models are a well known and well documented here in the iPad support communities.
This affects a still small, but contuning growing minority of random 2017 through present iPad Pro and iPad Air models and its user base.
After nearly 3 years of this nonsense, there is still no confirmed cause and fix/solution from Apple.
NONE!
Getting one of these defective units is very random and ONLY one of a small handful of issues going on with higher priced, larger screen iPad models that has prevented me from purchasing a new iPad Pro or new iPad Air for the past 2-3 years.
Apple and Apple support have no real fixes or solutions to this issue.
If you have a screen protector on this iPad Pro, remove it as the screen protector makes the touch screen and Pencil experiences worse.
There is absolutely no solution/s to these later iPad Pro/iPad Air touch screen issues.
Apple support can ONLY offer, temporary, “band-aid” bandage-like fixes/advice/solutions.
You can contact Apple support, but your iPad Pro/later iPad Air model maybe too old for Apple to offer any type of free or in-warranty iPad replacement and Apple will ONLY offer “band-aid“-like advice/fixes/solutions to this issue.
Apple support is pretty much clueless to this issue.
This is something you probably didn't want to learn, but doesn't change any of the currently known facts.
You can contact Apple support via the contact support link located at the upper right hand corner of every Webpage of these Apple support communities.
Use the Hardware Repair, Device Performance and Connectivity categories.
OR
by installing and using the Apple Support app found in the iOS App Store.
Tap the iOS App Store link below.
https://apps.apple.com/us/app/apple-support/id1130498044
OR
Call contact Apple via the support numbers found in the link bekow.
Contact - How to Contact Us - Apple
Tap the link below.
https://www.apple.com/contact/
So Sorry & Best of Luck to You!