I’m not so sure it‘s a M4 issue. I think it’s more of a IPadOS 17.5 issue since I’ve experienced this on all my iPads for quite awhile now (throughout the 17.5 developer beta updates). Now with my M4 the WiFi issue is still there.
I don’t think it’s just limited to the wake up as I have experienced it intermittently while browsing. A website may have trouble loading or not load at all because the WiFi connection was dropped. I’ve experienced this using both Safari and DuckDuckGo browsers. I’ve also noticed it with/without using a VPN. I’ve reported this to Apple before. To many moving parts to place blame (router, browser, VPN etc).