I think the general feeling is that whilst most refs will 'accept' swearing in a non-personal sense, e.g. 'ah, for fuck's sake', etc, if it's directed at them then that becomes a different matter. It's funny you should raise this now because we were talking about exactly this on our Friday Zoom-one of the lads is a ref and he said that if anyone directs language at him, very much like the example you gave, he'll send them straight off.
I know some people don't like the comparison but rugby does it properly-the players call the ref 'Sir' and if they talk back then penalties are moved 10 yards further forward and refs are shown a lot more respect than in football.