First of all I'm using VMware Workstation, which has it's own Internet connection sharing implemented, but I don't want to use it, as it does not implement the full stack. Things like tracing packet routes in guest operating system don't work.
So I turned this off.
Instead, I shared my wireless connection to VMware virtual network adapter in Control Panel -> Network Connections
of the host.
This setup usually works. Sometimes, though, it seems that Windows (host OS) stops sharing this connection for no reason. What works then is disabling the sharing, saving wi-fi connection options and then adding it again.
This happens only when the host OS is returning from sleep (but not always, some sleeps end well).
Can anything be done about it? What's causing the situation?