The radioman and other crew on the Liberty knew that Israel was deliberately attacking an American ship, but the Israelis themselves as their conversations being secretly recorded by the United States prove, did not.
At some level. The US spy planes picked up the communications to the pilots only.