This is what BG 8.5 and 8.6 say
Bhagavad Gita 8.5 Those who relinquish the body while remembering Me at the moment of death will come to Me. There is certainly no doubt about this.
Bhagavad Gita 8.6 Whatever one remembers upon giving up the body at the time of death, O son of Kunti, one attains that state, being always absorbed in such contemplation.
Does it mean a lifetime of wrong karma will be forgotten if one remembers God at time of death ?
Please note I am not delving into how lifetime preparation is required to remember God at time of death. Just seeing if this is a shortcut
Scripture references would be helpful if the answer is No.