I was having the same problem. Found another post about closing applications and restarting the iPad but it didn't help. My computer (I'm using it now to post) accesses the internet just fine; it's just the iPad that was having problems, and it seems to be external and not my network. I was getting the message, "Cannot Open Page: Safari cannot open the page because it's not connected to the Internet." Email and other applications were also not accessing the internet.
I clicked on "Forget this network" and my 5G network disappeared, iPad connected to my other wireless network, and the problem seems to be solved. Now it is connecting (seems to be going back and forth) between my regular and 5G networks, but it is working just fine.
I definitely suggest you go into Settings -> Wi-Fi -> Choose a Network -> click "Forget this network", and re-install as needed.