There is an option in macOS power management settings that effects the functionality of the network adapter in sleep mode, and can prevent the application from reconnecting upon waking from sleep.
The Power Nap feature is described as follows: "While sleeping, your Mac can back up using Time Machine and periodically check for new email, calendar, and other iCloud updates." — This keeps the network adapter active while the computer goes to sleep, and if the device wakes from sleep on the same network, since the device is not connecting or reconnecting to a network, it will maintain the connection status that has been set before putting the computer to sleep.
Turning off Power Nap will allow the application to reference the automation settings and reconnect upon waking the device, if you have specified that behavior. Note that this is in the Battery as well as the Power Adapter settings separately.