There are two arguments on this.
One side says yes they can, but the fact of the matter is they don't care. The other side says they can't because restoring (especially if you used DFU Mode) wipes all traces.
It doesn't really matter because up until about 2014 the general procedure was to restore and then see Apple. I've done this multiple times, others have as well and I've never had a problem. There is a reason that restoring and seeing Apple was the procedure and it wasn't because people liked to do restores for no reason.
Lastly, as of early 2014 or so, a jailbreak has to be the culprit before Apple will deny warranty. The most they can now ask you to do if you hand over a jailbroken iPhone is ask you to restore.
If that is the case, and you are handing over a fully restored device do you think Apple is going to care?
My own experience says no they don't. I turned in a 6+ that was fully jailbroken in September 2015 because of a cracked screen. The genius was aware and restored my device, then disappeared into the back with it.
An hour later another genius handed me a brand new replacement because they couldn't get iOS 9 to boot my old phone (duh, because the Apple genius didn't do a DFU restore and it bootlooped!). So, I got a brand new iPhone for the price of a screen replacement AND THE GENIUS KNEW I WAS JAILBROKEN.
So. Take that as you will.