They did in fact occupy North Korea, South Korea shouldn't be a problem here
This is simply oversimplification. First of all, there were no such comparable entities, since southern Manchuria and the Korean peninsula were fragmented among numerous culturally and linguistically related tribes, and your suggestion is similar to saying that it wouldn't have been a problem for the Roman Empire to occupy Germania. In both cases, although it might have been possible to occupy a significant amount of territory, it would have been difficult, if not impossible, to take over the entire area because of frequent raids and occasional uprisings.
At best, Han control was limited to the Liaodong peninsula and a small portion of northwestern Korea. As people have already suggested before, two of the four commanderies were lost within 25 years, while another's (Xuantu) capital was lost within that time period, and its borders were shifted further north. This suggests that another entity in the area, most likely Goguryeo, had raided the commanderies to the point where the Han thought that it was unprofitable to retain all of them, and were content with a looser control over the region as a whole. The Samguk Sagi also suggests that the Lelang commandery, which lasted until 313, was briefly conquered around 30 AD before the Han recaptured it. This might not be necessarily true, but it, along with other passages, does highlight the fact that there was a prolonged power struggle between the Han and the natives for over 300 years, and this would need to be completely butterflied away in order for the Han to even think about expanding into the southern part of the peninsula.
You also have to consider that the Han was already preoccupied with the Xiongnu for over 200 years, and in fact, the Han invaded Gojoseon because it had allied with the latter, and had also cut off trade relations. The prolonged conflict, along with other ones to the west and south, would be much more important to the Han than taking over fragmented states in the peninsula, then invading what is now Japan in order to conquer more fragmented states. Also, by the time that the Xiongnu collapsed as a whole in 89 AD, Goguryeo would have been developed enough for the Han to just retain loose control over them, as it learned in 172 during the Battle of Jwawon.
This is not completely true. Geography is one important thing among others, since the lack of organized resistance let Han China take northern Korea. This is a thread about Han China, so the wars of Tang China are largely irrelevant. Anyways, from a factual point of view, the Khitan Liao did make a serious attempt to invade Korea, though they did not succeed.
There was plenty of resistance, but over time, many Gojoseon officials defected to the Han, causing the former to weaken and disintegrate. Also, freethinker did create a similar thread before concerning how China in general did not expand "far" beyond its borders.
Also, Chinese hold wasn't that tenuous. It lasted about four centuries with the Lelang Commandery, though the others didn't.
See my response to freethinker above.
It wasn't that quick. There were three of them over 25 years, a bit less than the amount of time the Mongols took.
Either way, it's still not completely true. There were serious attempts at invading Korea after Tang times. It just so happens that the Khitans didn't succeed militarily, though the Khitans succeeded in the strategic sense that Koryo stopped supporting the Song Dynasty.
There were numerous attempts, but at best, the Khitans would have probably occupied the capital, only to be set back by numerous guerilla attempts which would have forced them out after realizing that it would have been too costly to maintain. The terrain would probably be a key factor, not to mention a navy that would supply them as well.
Save for Han River valley, the South is about as rugged (And it's consistent lack of flat land, rather than high mountains that makes Korea difficult to hold) as the North is, though not as high up.
Goguryeo started raiding the commanderies because it was located on rugged terrain, which meant that it had to acquire food and other resources from other areas. This was also the reason why it began to establish a tributary relationship of its own as the surrounding tribes had ample resources, but no or very weak armies.
As for the Lelang Commandery, I sort of consider it an exception, because it was the first real such centralized state structure on the peninsula, and really (like in a number of other areas in the world), served as a kind of breeding ground for the Korean states that emerged from it.
See response to freethinker. There were cultural transfers, but it was just as much a prolonged power struggle.
The three Khitan invasions were different from the Mongol invasions because the Khitan weren't invading constantly over that period like the Mongols were, and the three invasions themselves wrapped up very quickly (With none of them lasting more than a year).
As for Goryeo (And it's Goryeo, not Koryo) no longer supporting Song, that was only in official terms, and we all know how far the official really goes in regards to actual reality on the ground.
Once again, the terrain and resistance were major factors. Goryeo did conduct trade and diplomatic relations after it ceased hostilities with the Khitan, although it did acknowledge the Liao as another powerful entity.