A lot of the time the flag itself isn’t visible on tv anyway, and we get a giant yellow “FLAG” box on the screen when they get thrown too.
You also have to consider why they are yellow, and the point being visibility on field and live. Our eyes see green then yellow light the best, and obviously the field is green. Bright green would be harder to see than yellow due to lack of contrast (even if there are fewer conflicting garments most of what you see is green), and if you go into orange you don’t solve the problem (browns, bengals, bears, dolphins, broncos, bucs). Red is harder to see at a distance and even worse color wise.
You could maybe do pink but it’s impacted by the red dynamic and still isn’t going to be as visible against the field as yellow even if it stands out the most from players and accessories.
There’s a reason tennis balls are yellow-green (though not as often on grass so they benefit more against blue and clay), soccer uses high vis yellow frequently, and lacrosse uses yellow balls in certain levels - it’s just the easiest thing to see.