Israeli pilots at that time were the Top Guns in the Med, where they operated.
They knew that the Liberty was not an offensive ship.
A newbie pilot would have known that the Liberty was a SMT with no firepower, flying the American Flag.
...the attack on the Liberty was destined to become a recurring source of tension between Israel and the United States. Although Israel apologized for the attack and paid compensation to its victims, many American officials rejected Israel’s claim that the Liberty incident had been an honest mistake. Rather, they blamed Israel for what was at best inexcusable negligence, or at worst the premeditated murder of American servicemen. Such charges persisted in the face of successive inquiries by a broad range of American agencies and Congressional committees, as well as a full Israeli court of inquiry, all of which found no proof whatsoever that Israel knowingly attacked an American ship. On the contrary, the evidence produced by these investigations lent further support to Israel’s claim that its decision to attack was, given the circumstances, a reasonable error....
much more at link
https://www.jewishvirtuallibrary.org/quot-the-uss-liberty-case-closed-quot
https://unpacked.education/video/the-uss-liberty-friendly-fire-or-conspiracy/
https://www.sixdaywar.org/uss-liberty/