Think about this way. We have (I think) around 30,000 troops stationed in and around Seoul. If North Korea was to attack South Korean, they would inevitably have to directly attack a very large number of US troops. There is absolutely no way -- none -- that the US would sit for that. North Korea and China both know that. In this case, our threat to retaliate with overwhelming force to a North Korean attack is 100% credible.
Contrast that with what's going on in Ukraine. We don't have anybody over there. If Putin invades, the only harm we can claim is being made to look a little foolish. There's no reason why Russia should expect any sort of military response to something like that. That's why our threat against North Korea is credible while our threat against Russia isn't.
Edit: In poker terms, we are pot-committed on the Korean peninsula and everybody at the table knows it. In Ukraine, we don't have the pot odds to continue in the face of any serious betting. In game theory terms, North Korean deterrence is a subgame perfect equilibrium, but it isn't for Russia.