I have exactly the same problem and I have been pulling my hair out trying to work out why. This is a new build only 2 months old. Same board, Z270X Gaming 7.
This behaviour started happening after updating from F4 bios to the latest F5 bios. As OP states, upon rebooting, the system shuts off only for around 2 seconds and then the power and lights flick back on and continues the rebooting process. I have no other issues in terms of the PC running. Just this strange behaviour. The PC boots fine and operates normally. This DID not happen on the F4 bios, and my bios settings including XMP are identical.
Again like OP states, if running BIOS at optimized defaults this doesnt happen.
I did some trial and error testing and changed my bios preferences one thing at a time and I found that the XMP profile seems to cause this strange issue. Fast boot or other settings even Power loading, seem to make no difference to this behaviour. But as soon as XMP profile is turned on, this happens. Without it the system reboots perfectly normal and the power stays on during the restart process.
As I said this did not happen with F4 bios, Im now kicking myself for upgrading but how was I to know.
I hope gigabyte are aware of this issue and fix it with the upcoming updates. Unless someone else knows a workaround?
The XMP instability issues were present with the first few bios versions but F4 has been the most stable so far.
The other issue is you CANNOT roll back from F5 bios, it prohibits it.
Now the fact the OP also is running F5 bios proves this is some sort of bug that has been introduced in the F5 bios. I'd like to hear from GIGABYTE on this.
Any ideas?