Network Slow To Wake From Sleep
If your Mac enters its full sleep state, then your network connections will be disconnected. Your Mac can not be connected to a network and be asleep at the same time.

You can avoid full sleep by setting your Computer Sleep to Never. Your MacBook will then sleep all the sub-systems possible when idle, but will remain awake enough to maintain a network connection.

PowerNap is not the same as full sleep. This is a special state controlled by Apple and, for now, available only to Apple's chosen processes.