First, did such a thing even happen? I want to see named testimonies.
Second, if it did happen, did Hegseth actually give such an order? I don't believe for a moment that Pentagon lawyers would let "Kill everybody" go down the chain. OTOH, Hegseth loves to put everyone on chat during military operations, so he could have said that directly to the operational unit. Or the order may have been something ambiguous like, "It's not required to take prisoners," and someone lower down interpreted that as "kill everybody."
But, if it did happen, everyone in the operational unit (I've heard it was a SEAL team) has had Law of Armed Conflict training, so every individual knew such a thing was illegal. What does that mean?
Well, in the Vietnam case of Lt William Calley, the enlisted troops were not convicted of war crimes. Investigation showed that Calley (as an officer) had gotten training in the Geneva Conventions...but the enlisted troops had not gotten specific training. In the military, ignorance of the law is a positive defense. So, in the 70s, the military made absolutely certain nobody in uniform could any longer claim ignorance, hence the creation of annual Law of Armed Conflict training mandatory for everybody.
And the DoD is serious about that. In my last assignment, I was superintendent of the training facility for STRATCOM, a joint command. We trained all the services, and my general was dead on my butt every day until each individual was signed off on their LOAC training each year because the Pentagon was dead on her butt about it. I was in front of her desk every day handing her the numbers and names of those who hadn't taken it yet.
I say all that to point out that everyone in the operational unit knew it's illegal to strafe survivors in the water. What they know will be held against them.
If it actually happened.
Of course, Trump will probably pardon them anyway.