I guess that when you pull out the ethernet plug, then put it in again, the ENC28j60 is capable of rebuilding the connection to the router so you can ping it (from another computer on the same network). However, the Arduino has not repeated all that configuration in setup() so your application will no longer work.
Maybe periodically test on the arduino if the network connection still exists and, if not, force a system restart or try repeating the setup() code.