It really goes two ways. I've had both scenarios: one where I subbed and drew 2-2 in the last minutes when I was leading 2-0 the whole game. Then another game where my guy I just subbed scored within the next minutes.
Anyway you can see that you suddenly lose possession before having your sub in. I think it affects what happen next a bit.
Just like the rest, I guess you have to be a bit lucky