As described, you are likely covering the light-sensor - which is positioned at the top of the display when viewed in an upright/portrait orientation (i.e, the Lightning/USB-C port is at the bottom of the iPad).
The sensor is designed to measure the ambient light levels (brightness and colour temperature), this controlling the display. Whilst it would be unusual for the screen to reduce brightness to zero, you should expect to see the screen respond with low brightness if the sensor is completely obscured.
You might need to review your screen brightness setting - particularly when in a darkened room.
Settings > Display & Brightness
You may find this Apple help page to be useful in understanding these settings:
https://support.apple.com/en-gb/guide/ipad/ipad997d972d/ipados