There are two main points of time of "Japanese invasions".
The first one was the 1931 invasion of 1931.
The second one was the out-break of the Second Sino-Japanese War in 1937.
For the first one, when Japanese invaded Manchuria, there was no fight with the KMT because the KMT had no control of the northern area. If someone says that CKS had successfully took control of all of "China" by the end of the 1920s, then they are in effect saying that Manchuria was not part of China because the KMT had no control of the area. And they never did. After the collapse of Yuan Shikai, the warlord in control of the Manchuria area was the Fangtian clique. And Japan backed this clique because they were a useful buffer for Imperial Japanese territory in the Korean peninsula. But the Fangtian clique suffered some military defeats during the warlord fights throughout the 1920s. By 1928, the economy of the Fangtian clique fell apart. The top economy official abadoned the clique. In 1929, the Soviet Union attacked the left over government and easily defeated the left over military in the area. The SU attacked in order to reassert control of a railway that ran from the northwest straight down to the southeast onwards to Vladivostok. KMT no where in sight. Comes 1930, still no KMT. So then comes September 1931, still no KMT. The Japanese moved in. A huge area worth about 30 million people was taken easily. If the KMT was doing well, then they had 3 years to move in and take over. But they didn't. Instead Soviet activity increased in the area. And what yje Japanese installed was a Manchu state, not a Chinese state. Mind you, Manchuria was part of China only during the Qing dynasty. Before that, the area was a Manchu country. So it wasn't even deeply Chinese like how the areas more southeast of it were. The whole, yet stupidly short phrase of "Japan invaded China in 1931" really ignores so much about the whole situation about it. However CKS was angry at Japan for taking Manchuria despite the fact that he had no capacity to take the area himself! An area that was a piece of cake for the Japanese to take. In addition to increased Soviet activities in the area, another reason Japan went in was because anti-Japanese Korean communists fighters were operating from the area north of Korea. So taking Manchuria helped eliminate area where Korean communists could make a base of operation.
As for 1937, again, it wasn't a wholly unprovoked blatant invasion. CKS was kidnapped in December 1936 and pressured into ending his fight against the Chinese communists to form a "united front" against Japan. Chinese nationalistic sentiment and CKS himself wanted Manchuria back, along with anger at special provisions granted to foreigners in places like Shanghai. Shanghai I could certainly understand. But if CKS just accepted the Japanese having Manchuria, then there would never have been the motive to escalate the fight with the Japanese at skirmeshes in the northern areas like at the Marco Polo bridge. By mid 1938, Japanese advances were stopped, but KMT was qjite beat up ane weak and they often appealed for foreign aid including lines of credit from the US on two or three occassions. The FDR administration preferred CKS China and so year after year more and more credit was sent to KMT. First time was 25 million USD, or about 450 million in today's dollar in 38' if I recall correctly. Another one was sent the year afterwards. On the Japanese side of China, the Wang Jingwei regime was established by 1940 and this reasoning was used by CKS to ask for more money from the US. The US kept digging in the preference to back this incompetent KMT regime, which had brutal and forced recruitment for soldiers, some being young Chinese being kidnapped and pressed into service. And the US going as far as direct and total war with Japan, all gor what? ... the KMT losing to the commies. If the US wanted an anti-communists wall in Asia, Imperial Japan was that country! Japan was able to handle both China and the Soviet Union. But the US had to pile on. I reckon had the Wang Jingwei regime had a chance, they could have done better than the Chinese communists.