The Vedanta Sutras of Badarayana, Commentary by Sankara (SBE38), tr. by George Thibaut  at sacred-texts.com
28. And because (on the above interpretation)
there is no contradiction to both (i.e. man's making an effort to free himself from his deeds and actually freeing himself) according to his liking.
Moreover if we assumed that the man frees himself from his good and evil deeds on the way--after having departed from the body and having entered on the path of the gods--we should implicate ourselves in impossibilities; for after the body has been left behind, man can no longer accomplish, according to his liking, that effort which consists in self-restraint and pursuit of knowledge, and which is the cause of the obliteration of all his good and evil deeds, and consequently that obliteration also cannot take place. We therefore must assume that the requisite effort is made--and its result takes place--at an earlier moment, viz. in the state in which man is able to effect it, and that in consequence thereof man rids himself of his good and evil deeds.
Nothing then stands in the way of the conditioning and the conditioned events taking place, and the assumption moreover agrees with the statements of the Tândins and Sâtyâyanins.