The Timing of the Movie
I noticed the release date and considering pre-production took place before the war started (for the United States) and that filming had already started, while it was released on 6 June 1942, the context becomes clear.
I see them planning the movie and getting ready to shoot. They expect it to be a moderate success. It's a biopic about a popular singer, dancer, actor, director, and producer all wrapped up in one person. It stars a well liked actor and it is coming at a time when Americans are anxious about the war in Europe and looking for some relief. However, they limit their risk by filming in black & white to save on film stock. They also shoot it on back lots and on sound stages rather than location shooting, but in those days it's mostly only westerns that are shot on location.
Pearl Harbor is bombed by the Japanese while principle filming is going on. By the time they finish filming and post production a lot has happened. Wake, Singapore, and the Philippines have fallen. We are losing the Battle of the Atlantic to the German U-boats. On the other hand, Jimmy Doolittle's boys have bombed Tokyo and the British were seeing some success in North Africa, though the Germans were not yet retreating. Also, the movie going audience would soon know that on the day of the release of Yankee Doodle Dandy Admiral Jack Fletcher caught the Japanese Main Fleet with its pants down north of Midway Island in the Pacific Ocean, sinking four Japanese aircraft carriers.
Americans were ready and able to feel patriotic.