Greetings,
Welcome to the forum.
Given the vehicle is a recent purchase, you are doing the right thing by taking it back to the dealership - they have the diagnostic tools to read & correct the problem. (It's under warranty, let the dealer find & fix the problem..)
--
That said, if you wanted to post some additional info as to what the dealership found / what they've replaced / what codes where read when it was brought in, hopefully some savvy Optima owners could lend some perspective & help.
Regards,
GottaCruise