If the iPad disconnects when idle (sleep/locked) you may need to verify the your WiFi Settings for each of your configured WiFi Networks - ensuring that they are set to Auto Join:
Settings > WiFi > [WiFi Network / SSID] - tap the “i” icon - set Auto-Join to ON
Unless Auto-Join is enabled, your iPad will not automatically reconnect to the WiFi network when resuming from sleep - or when coming into range of your WiFi network.
Auto-Join is enabled/disabled for each configured WiFi network.
System software updates can, in some circumstances, trigger a problem with the iPad (or iPhone) internal routing table. The causes are many, but are usually attributable to some types of App or associated device configuration.
If you have a VPN App or profiles installed, or a security App such as Norton, these may be interfering with DHCP - and preventing your device from obtaining a valid IP Address for the WiFi network/hotspot to which you are attempting to connect. The resolution is usually simple; if installed, you may only need to temporarily disable or remove the Security App and/or VPN.
DHCP is frequently used to automatically obtain an IP Address. Until your iPad has a valid IP Address to connect to your network, you will not have an internet connection. Disabling or removing VPN and/or the offending security App should allow DHCP to operate normally - allowing connection to your network and the internet.
If this resolves your issue, the VPN and/or security App can be reinstated after the connectivity problem has been resolved.
If you continue to have difficulties, check to see if your iPad is using the new WiFi Private Address feature. This feature is intended to provide additional privacy and security when using “public” (untrusted) WiFi networks.
Settings > WiFi > [Your WiFi Network / SSID] - tap the “i” icon - Private Address
The Private Address feature is largely unnecessary for your home WiFi network; if enabled, Private Addressing can cause issues if specific MAC addresses are expected by your WiFi Router. You may need to disable this feature - and can be enabled or disabled for each individual network.
Use private Wi-Fi addresses in iOS 14, iPadOS 14, and watchOS 7 - Apple Support