I explained why you do not get the same result.
If you press the button as shown (i'm not familiar with that symbol), then all inputs are tied together.
Your transistor only connects A and B or P2 and P3.
It does not break the connection between P1 and P2.
If the switch actually switches (toggles) P1 or P3 to P2 (so not pressed is P1 + P2 and pressed is P2 + P3), then you would need to also take over that breaker switch (P1 / P2).
This can be done, you will need an extra transistor (different type) for that.
I now see the title tells it's about a toggle switch, sorry about that.
Also, take in consideration that a transistor can be used as a switch, but it really is not a switch.
You will have a larger voltage drop over this transistor as you would have over a switch.
This might also contribute to an unwanted effect.