I'm not sure on this but I think the offside has to do with the fact that the keeper was not behind all defenders. I think offside is based on the last defender that is in front of the keeper. It is still very obnoxious though #QATECU #WorldCup2022