If at death we are suddenly a different person that we were in life than it would not be just for God to judge us by our works, for he would be judging a different person, a different being, than the person we were at the time we did our mortal works.
The very fact that it is by our works that we are judged tells us that we don't magically become a different person when we die.
Now there are some differences. We will not be subject to a body that has its own desires, pushes and pulls that are at times in direct opposition to what God would have us do.
But whatever those differences amount to, we are still essentially the same person. For it will be by the works done in our body that we will be judged. It is probably no coincidence that the resurrection precedes the judgement, so that we are actually in our body at the time we are judged. But our body will have become a glorified immortal body, instead of a mortal fallen one. We will not find ourselves "warring against our flesh" with our body when it has been resurrected.