I know this post is very old, but nonetheless I hope this helps anyone else researching this problem.
The cam belt gear located on the crankshaft wears done on the inside of the gear. This causes the gear to "wobble" and hence touch the timing sensor, which damages it and results in its failure.
This wearing of the gear is by design and Hyundai should be taken to task for this. The crankshaft does not have a key between it and the gear. The crankshaft has "flattened" sides which match the gear and prevents it from "slipping" on the shaft, but with time the flattened edges of both the crank and the gear wear out and the gear wobbles slightly. This then accelerates the damage and can cause the gear to begin to cut into the aluminium engine cover and the main oil seal.
The only resolution is a new crankshaft and gear or sell the car.
I have had my battles with Hyundai and did not win, even though i could show a design fault.
I hope someone out there can take these guys to task and actually win and so create a precedence for the rest of us.