I've been assured by the Instagram influencer shark experts that if you just make eye contact with them, they'll know you're not prey.
I know this is in jest, but it's not too far from the truth.
When I was first getting interested in spearfishing, I attended a spearfishing seminar put on by a local speargun builder who had spent many years as a commercial spearo. Someone in the group asked about sharks, and more or less that was his response. He said on first contact, he would usually point his gun and swim toward the shark. Usually didn't even need to actually contact the shark before it would take off. I've practiced this many times and this was always the case. Eye contact alone is not enough, but a strange thing swimming toward them is not typical prey behavior, and that usually discourages further curiosity.
Doesn't sound like any of that would have helped in this case, as it seems that the victim likely never even saw the shark. It's easy to miss a shark when you are focused on the hunt. I've added a Shark Shield to my kit in the last few years. I'd been thinking about it for a while and decided to pull the trigger after a close contact a buddy of mine had. He had shot, and was retrieving his spear. After a little bit, I noticed a shark swim by and did what I usually do. When I was reviewing GoPro footage later, I realized that the shark had previously come close enough to bite his foot. In this case, it was a smallish sandbar shark, and nothing happened, but it was spooky how close it had come without me seeing it.
Next dive out, I had the Shark Shield. Another buddy had spotted a shark cruising toward us, and it abruptly changed direction and left the vicinity. Shark Shields work, but even they won't deter a shark in full feeding mode, so with anything the key is that they get the message when still in curiosity mode.