Because your version implies 2 separate imperatives : stai attento, non svegliare il bambino. Duolingo's sentence was : stai attento A non svegliare...
I did the same the first time round and it was marked as incorrect probably because there is no 'and' in the sentence. So second time round I put 'Be careful not to wake up the baby' and it was marked as correct.
Why not ' Be careful that you do not wake the baby'? This sounds perfectly acceptable as a translation, unlike the answers given.