That's just pure bad code....
There is no way that the visual should change until the game engine recognizes the substitution...
I see it all the time.... just never had the results you had.... I did have a player score a goal just
before coming out.... though the visual showed him already gone....