Ah, the blight that is the dreadful wifi error, it's basically like the 360 red ring of death at this point. The ROG Phone 5 seems to be the black sheep of the family.
Sadly, the only solution for this is to visit the service center and get a motherboard replacement as sooner or later the phone will shutdown and won't boot again.
Better backup whatever data you currently have and find a replacement while the service center orders the motherboard for replacement.