This is a great question to think about. Although Gertrude appears to be very repentant in the kind of langauge she uses with her son after he confronts her about the truth of what happened with his father, you could argue that Gertrude doesn't actually change at all in terms of her loyalties. Note what she says in Act IV scene 1 straight after her meeting with Hamlet. When Claudius asks her what is wrong, she immediately tells him, not thinking to try and protect Hamlet and save him from accusations of murder:
In his lawless fit,
Behind the arras hearing something stir,
He whips his rapier out and cries "A rat, a rat!,"
And in his brainish apprehension kills
The unseen good old man.
From this perspective, it could be argued that Gertrude has not changed at all and what she said and promised to Hamlet was only a heat of the moment response to his violence and pressure. The speed with which she tells Claudius, Hamlet's enemy, about Hamlet and what he has done indicates that she has undergone no reformation. However, at the same time she does not reveal to Claudius what Hamlet said about him and her first husband, which perhaps indicates she has taken some of what her son said on board.