If the Dutch government surrendered to the Germans in 1940 why wasn’t the Dutch East Indies simply up for grabs? Couldn’t the Japanese have worked something out with the Germans to annex The Netherlands’ pacific holdings as part of their Axis pact? I’m just curious why the Japanese let a territory abandoned by an occupied government just sit there until after they had already declared war on the U.S. They could’ve solved their oil shortage years before it even became an issue.
The premise of your question is wrong. The Dutch government didn't surrender to the Nazis, the Dutch military did. The Dutch government went into exile in London and later one of the princesses even moved to Canada. This movement to Canada is very famous, because she had a child there and the Canadian government temporarily gave part of their territory to the Netherlands so that the child would be born on Dutch soil.
Anyway, Queen Wilhemina didn't surrender to the Nazis and dismissed prime ministers that suggested she should do so. She formed a government in exile and all the Dutch colonies reported to her, not to the Dutch collaborationist government in the Netherlands. Willhemina cooperated with the Allies, giving important strategic colonies to the UK or the US (like Curacao or Aruba, which had big refineries) or participating in the oil embargo of Japan in 1941.
The Dutch East Indies therefore were still part of an independent country. If the Dutch collaborationist government decided to "give" them to Japan (like Vichy France was convinced to do so with Indochina), there would be many issues. The first one is that, unlike Indochina, the Dutch East Indies are reporting to the Dutch government in exile officially. So a military invasion would be required to enforce that decision, to remove all the loyalist Dutch officers there. Secondly, just like Indochina, such a movement would cause trouble with other countries, especially the US, who started the embargo on Japan after Japan occupied Indochina. So if Japan occupies / invades the Dutch East Indies an agressive move by the US would be expected, maybe an embargo (and Japan depended on the US for other things besides oil, like scrap iron) or even outright war. The Philipines would be in the middle of the supply line connecting Indonesia to Japan, so a hostile Philipines would make having Indonchina moot, most oil freighters would be sunk by the planes or ships there.
The thing is they were planning on attacking there but it was just when to do it. Japan was already switching its focus into Southeast Asia, but it wasn’t about to jump head first into it. If they attacked the Dutch East Indies, this could trigger the US and UK into declaring war on Japan. If this happened then Japan could lose without even securing the East Indies. But what really made Japan attack the Southern Pacific was when the US embargoed Japan. Before Japan was trading with the US and the US provided most of their oil, even with new restrictions put on years before, it still was enough to supply its war effort. After the full embargo took effect in late 1940, Japan now had no choice but to invade the Dutch East Indies. But it first had to take care of the US fleet at Pearl Harbor, with it out of the way, Japan could take all of the territory in the Pacific with little to no resistance from the rest of the West. And even if Japan could have invaded immediately after the fall of the Netherlands, it takes time to plan an invasion and to position everything correctly.
It’s wasn’t a matter of why they didn’t invade, but more of a why should they? They are getting all of its other resources from the US and didn’t really need to anger another power while it’s still invading China and recovering from the Soviet border conflict. But after the embargo by the US, UK, and the Dutch, it became too much for Japan and it forced their hand.