Bible say God cannot be tested if Jesus was God in the flesh why was he tested?James 1:13
17 The seventy-two returned with joy, saying, “Lord, even the demons are subject to us in your name!” 18 And he said to them, “I saw Satan fall like lightning from heaven. 19 Behold, I have given you authority to tread on serpents and scorpions, and over all the power of the enemy, and nothing shall hurt you. 20 Nevertheless, do not rejoice in this, that the spirits are subject to you, but rejoice that your names are written in heaven.”
Jesus was a human body. Imagine trying to fit all the oceans into a cup of space. Jesus was god in flesh but god is not limited to a shape or size. If he was all of God it wouldn’t of been Jesus.
the answer is in your question…Jesus was fully God AND fully man. how would he be able to empathize with us when we’re tempted if he never experienced it personally? walking a mile in someone’s shoes does a lot more for understanding then just knowing something is not good. we have assurance that we can be delivered from temptation because christ was, and he showed us how to have deliverance.