digitalWrite(14, 13); // Actvate digital Out 14 when In13=true
...writes the constant value 13 to a digital pin. Which is theoretically invalid. HIGH and LOW are the only documented values for digitalWrite. However, digitalWrite treats zero / false values as LOW and everything else as HIGH. Which means that line of code is essentially this...
digitalWrite(14, HIGH); // Actvate digital Out 14 when In13=true
The problem is:
transition IN13 0->1 = immediately
transition IN13 1->0 = it needs 1 or 2 seconds to detect the input is off (out still active)...!!
That makes no sense. Pin 13 is the INPUT. Shouldn't you be looking for transitions on pin 14?