what is wrong after u replace cam sensor still same problem? on 2004 Hyundai Santa Fe

Replaced cam sensor vehicle still stalls,stops and will not start back for about 30 minutes.Can not drive a long distance more than 10 miles.

Asked by for the 2004 Hyundai Santa Fe
how many miles on engine? what was the reason cam sensor was replaced ? symptoms other than stalling/check engine light/codes?