It seems the tension is between Jesus’ humanity and his deity. If he is truly human, he is capable of sin but resisted it perfectly. But as deity, he is incapable of sin so doesn’t that counter his humanity and capacity to sin.
I once heard an explanation that I found very satisfying. It goes like this. In his humanity, Jesus’ resisted all temptation to sin so his deity, which would have prevented sin, was a backstop against sin that was never reached or needed.
This maintains his humanity and his sinlessness while retaining his perfection as deity.