Main difference was in international situation. Soviet failure in Winter War to occupy whole of Finland was caused by their inadequate preparations, stronger than expected Finnish resistance and a fear of western intervention. They still won the war, despite never accomplishing their goal of annexing or puppeting Finland.
Two years later Finnish army was a completely different beast than the half killed exhausted wreck it was at the end of the Winter War. Finland started Winter war with 10 divisions, one of them unarmed. In 1941 Finland mobilized 16 divisions. Deficiencies in artillery, anti tank weaponry, airpower and munitions had been rectified with war booty, late military aid and German imports.
When Finland attacked in 1941, they advanced as far as they saw fit. Soviets could not stop them and Finns halted at their objectives in all other fronts, except at Kiestinki under German command. Finns retook all lost territory, and more. Almost the whole East Karelia was captured. At Porlampi alone three soviet divisions were destroyed. Soviet counter attack in late winter 1942 was a complete disaster. After that the fighting almost stopped and trentch warfare begun across the whole front. Only small scale raiding was conducted by either side.
In 1944 Soviets tried again to subjucate Finland. Their Summer offensive started out with success, breaking through Finnish front line in the Karelian Isthmus the second day. Finland had completely neglected preparations for an offensive there. Despite massive amounts of intelligence data from prisoners, patrols, decrypted soviet communications and aerial photography, high command did not believe an attack to come there. There had been more troops on the isthmus in the Winter War than there were on the day so iets attacked, even though the Finnish army was much larger. The Soviet ofdensive was stopped with reinforcements from other fronts and new German AT weapons, which had not been distributed to troops before the offensive for some ungodly reason. Before their attack was stopped Soviets demanded unconditional surrender from Finland. Soviet offensive reached interim peace borders only once, and the two Red Army divisions there were routed, losing all of their heavy equipment and retreating back east.
Finland and Soviet union signed an armistice in the autumn. Finland Ceded the same territories as after Winter War plus Petsamo region up north. Hanko base was changed to Porkkala. Soviets did not have the forces necessary available that would have been needed to occupy Finland. Finnish high command anticipated German defeat from late 1941 onwards, and had tried to make peace for the whole time, but Soviet demands were unacceptable. Finally in late 1944 Soviets had failed to occupy Finland. Then they offered peace terms lenient enough for Finland to accept. They were still harsher than in 1940, even though Finnisha army was in much better position. In fact Finnish army had never been stronger than in late 1944 after stopping the Soviat offensive. Finland needed to get out of the war, not because of their military situation, like in Winter War, but for the fact that their unofficial allies were losing the war in south. Finland alone could not fight the soviets indefinately, so peace was necessary. No aid was from anywhere this time, sinve Germany was losing and unable to help, and Western powers were allied with USSR.