Despite early victories they knew they would lose a protracted war.
I think Yamamoto thought the same.
The Japs had a bad case of victory fever and went out to destroy the American carriers to finish things off. That’s what Midway was all about.
If the Japanese had found our 3 carriers before we found their 4 carriers we would have lost at Midway. Then, they would have sailed to california and bombed the coastal cities and factories until we gave up. War would have lasted at least another two years and the outcome might have been different.