When Wi-Fi drops after sleep, it is usually a setting that lets Windows turn off the wireless adapter to save power. Untick it in Device Manager. If the IP address starts with 169.254, the PC did not get an address from the router, and getting a new address reconnects it.

Buttons, not commands. PC Buster finds what opens ad pop-ups, clears junk and points to what is broken. Checks and cleanup are free.
Free downloadIf ipconfig in Command Prompt shows an IPv4 address of 169.254.x.x, the PC did not get an address from the router. In an administrator Command Prompt:
ipconfig /release ipconfig /renew
If it is still the same, unplug the router, wait 30 seconds and plug it back in.
PC Buster's Device Rescue checks the wireless adapter's power saving setting and connection status, and blocks drop-after-sleep and reconnects Wi-Fi with a button. Network Check measures whether the connection breaks at the router, the ISP or name lookup. Diagnosis is free; the "Fix" button is paid.
No internetDNS server not respondingDrops with Ethernet and Wi-Fi both onWi-Fi network not showingOther PCs not showing on the networkShared folder or NAS won't open (0x80070035)Find your computer name and IP addressFind your Wi-Fi passwordBluetooth keeps disconnectingSee all fixes