This should be delivered as training material. If you are an AR, it is literally your JOB to pick up on this.
AR needs to monitor this entire area as much as possible while maintaining his position. 4th official should constantly scan these danger areas when not dealing with the bench. So should the far AR, while maintaining position.
One of my biggest criticisms of the Australian A-League officials these days is just how much off-the-ball stuff like this gets missed. It's the job of the 2AR's and 4th to be the eyes on the back of the referee's head. That means, when there's just been a little bit of a clash, consider the fact that the players may keep going with it and monitor that. Your positioning and offside judgement comes first, but you need to monitor this stuff. Because it's not really possible for the ref to have spotted this, given play has gone in the complete other direction.