I need Wifi/relay in parallel to push button
Educated guess is that the length of wire used is causing a floating condition, and picking up noise. This is causing signal to change, triggering a false button press. Essentially wires acting like an antenna. There are a few ways to fix this electronically, like using shielded cable or twisted cable, using an optocoupler locally ( that might still have some issues with noise), a filtering circuit, etc.

A better option is a mechanical relay. A relay will be less likely to trigger based on noise due to its current and voltage requirements on its solenoid section. It can still be triggered remotely, even at a couple of meters without issue. Since the switched side will be right on the target board, the button will not experience noise. Based on OPs response this has solved their issue.