There’s very few service bulletins on the 2018 Sonata non-turbo, non-hybrid 2.4L engine. Nothing that would obviously cause this symptom. I’m seeing no reference to harness problems either, but that info may not appear in the service bulletin database yet.
I seen to recall a discussion here about this issue, a software update results in needing a new wiring harness. Doesn’t apply specifically to the Sonata, but to some Hyundai engine configurations. You might try the forum search feature. Upper right on this page. Here’s one I found