Who makes an offside decision? Is it the AR? Or is it the Referee? Or is it both?
The AR is the one that raises their flag so you may think offside is on ARs. You may have also heard a pre-game discussion in which the referee says, "Leave PK decisions to me and I will leave offside decisions to you."
But in order to get any decision correctly, we need good teamwork. Below, you will see a video in which a defender clearly kicks the ball to an attacker who is in an offside position. It is not impossible for the AR to see it but it is still quite difficult because the AR is paying attention to the offside line and the last play is far from him. Furthermore, there was also an attacking teammate near the ball. But the referee had a good view of the entire sequence. Therefore, the referee is expected to know who played the ball last.
If the crew have comms, the referee needs to annouce to their AR that the ball was last played by the defender so that the AR would not raise their flag. If they don't have comms, it is completely understandable that the AR raises their flag but the referee is expected to wave them down.