Here are a few thoughts from Barth on the idea of Jesus being both man and God, and what this means with regards to the sinlessness of Christ:
‘But if we ask where the sinlessness, or (positively) the obedience of Christ, is to be seen, it is not enough to look for it in this man’s excellences of character, virtues or good works. For we can only repeat that the New Testament certainly did not present Jesus Christ as the moral ideal, and if we apply the canons usually applied to the construction of a moral ideal, we may easily fall into certain difficulties not easy of solution, whether with the Jesus of the Synoptics or with the Jesus of John’s Gospel. Jesus Christ’s obedience consists in the fact that He willed to be and was only this one thing all its consequnces, God in the flesh, the divine bearer of the burden which man as a sinner must bear.
Jesus’ sinlessness obviously consists in His direct admission of the meaning of the incarnation. Unlike Adam, as the “second Adam” He does not wish to be as God, but in Adam’s nature acknowledges before God as an Adamic being, the state and position of fallen man, and bears the wrath of God which must fall upon this man, not as a fate but as a righteous necessary wrath. He does not avoid the burden of this state but takes the conditions and consequnces upon Himself.
This is the revelation of God in Christ. For where man admits his lost state and lives entirely by God’s mercy – which no man did but only the God-Man Jesus Christ has done – God Himself is manifest. And by that God reconciled the world to Himself. For where man claims no right for himself, but concedes all rights to God alone – which no man did but only the God-Man Jesus Christ has done – the world is drawn out of its enmity towards God and reconciled to God.’ (Karl Barth, ‘Church Dogmatics’, I.2, p. 157-158)