I can think of two ways which may solve your issue.
One way is to make use of a small / cheap network switch or hub, which sits between your computer and your "upstream" router or switch. That way, if you need to disconnect or unpower that switch, the computer won't (can't) notice the link state change, because it's connected to its own hub. This does have the disadvantage of being clumsy, requiring a separate device, its power supply, and at least one extra wire.
Another way which might work, is to configure the windows TCP/IP stack to ignore the ethernet media sense. You can do this by changing a registry setting ... under the key
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters , change or set the
DisableDHCPMediaSense value to 1 (REG_DWORD). See How to disable the Media Sensing feature for TCP/IP in Windows . This is supposed to prevent the TCP/IP stack from unbinding from the adapter when it goes to disconnected state, which ideally will keep existing TCP connections from being dropped due to a transient disconnect.