The problem was that Denmark couldn't win it, when the war ended Denmark was occupying Swedens German possesions, still had forces in Scania and had more or less reconquered the lost Norwegian provinces. The problem was that the Franco-Dutch War ended and the French marched against Denmark and forced a treaty on the Danes, where Denmark only received 200 000 thaler.
Denmark need to defeat the Swedish earlier in the conflict, so that they can negoatiate a peace before the Ducth and French end their war.