Internet not connected after sleep wake even though wifi is connected after awake
I was having the same issue on one of my machines running both macOS Catalina and Big Sur. Tried forgetting the network and joining again, doing an SMC reset, and a few other solutions with no luck.
I was finally able to find a fix for it today (also posted it here https://alihaghani.me/blog/fix-mac-not-having-internet-access-on-wake):

Go to System Preference → Network
Select 'Advanced...' in the bottom right corner
Go to the TCP/IP tab
Enter 'ConnecMac' in the DHCP Client ID field
Select 'Renew DHCP Lease' above the field
Press OK
In the System Preferences → Network, select the Location dropdown
Select 'Edit Locations...'
Select the plus sign to add a new location
Enter 'Home' as its name