Use digital pin,both as input and outpout,without always reconfiging the pinMode

It's perfectly normal for electric windows to be controlled by multiple switches, and I don't see how it makes any difference if one of those switches is operated by an Arduino rather than a person. The answer that Paul__B keeps giving, which you keep dismissing, is surely the right answer.