Is the iPad in a fitted case, or have you installed a screen protector? If so, remove them - and test your iPad.
If the iPad has no form of exterior protection present - and the problem persists - perform a forced-restart of the iPad:
- On an iPad with a Home button: Press and hold the top button and the Home button at the same time. When the Apple logo appears, release both buttons.
- On other iPad models: Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the top button. When the Apple logo appears, release the button.

Should a forced restart not clear the issue, you would be best advised to visit the Genius Bar at your local Apple Store or Apple Authorised Service Provider (AASP) - where the technicians will be able to “hands-on” test and assess your iPad:
Genius Bar Reservation and Apple Support Options - Apple
Less usefully (as your specific issue is difficult to diagnose remotely), you might seek assistance directly from from Apple Support. You can contact the Support Team using the Get Support link at top-right of this page.
Alternatively, you can initiate and manage your support cases using the excellent Apple Support App. If not already installed on your iPad, the App can be downloaded from the App Store:
https://apps.apple.com/gb/app/apple-support/id1130498044