I suspect the flag went up for the first ball forward where the attacker was probably offside, although it was incredibly tight. Yes, the referee didn't stop play but he still didn't stop play after the final pass and awarded a penalty even though his assistant was stood with his flag up. Even after giving the penalty it took him some time to finally see the flag and reverse the penalty.
Whether a mistake from the AR or not, it is very poor refereeing not to see your assistant stood with his flag up for so long. Can only assume comms and buzzers both failed, but even so he should sill be looking across.