And as God He would not have sinned against or broken His own command.
But, one has to remember that Jesus was also the Lamb of God which was the sacrifice of God for the redemption of sinners.