The Japanese military losses in the Pacific battles contributed to her impending defeat but it did not at once bring about an end to the Pacific War. Arguably it was the dropping of the atomic bombs on Hiroshima & Nagasaki that made the military surrender hence an end to the war in the Pacific.
You can follow the story of the development of the atomic bomb to the bombing of Hiroshima at the
Hiroshima Peace Memorial Museum.
Hiroshima then
Hiroshima now