How would we detect a planet behind the Sun? Let's assume hypothetically that Earth has a twin planet on the opposite side of Earth's orbit. Its orbital period would be exactly the same as Earth's and it would always be behind the Sun so directly observing it from Earth would not be possible.

How would we detect the planet's existence short of sending out a spacecraft that could look "behind" the sun and observe it visually? Have we confirmed that there is no such planet?
According to the Wikipedia article Counter-Earth, this idea has been floated around for millennia.  However, modern day earth-bound techniques would easily detect a 'Counter-Earth' via the following (but not limited to) these methods:


Gravitational perturbations would have been observed to have occurred on the other planets (terrestrial)
As Earth's orbit is not circular, it is elliptical, it would not be consistently 180 degrees around the orbit, as below




(Image source)


Most of all, it would have been detected/observed by the satellites we have around the Earth, Sun and other planets (many examples here).