This line makes me think that the Queen genuinely does want Ophelia for her son. She says so at her funeral, that she hoped Ophelia would have been Hamlet’s wife and the way she talks to her here would seem to confirm it.
It’s quite a hopeful line in its way. And it does give Ophelia a lot of credit. Could a girlfriend’s virtues bring her boyfriend back from the brink of madness? Possibly. If they were accompanied by a lot of active help.
And maybe that’s what the Queen is implying? Is listening one of Ophelia’s virtues? Understanding? Problem-solving? We don’t see any evidence of any of those things in the text but that doesn’t mean she doesn’t have them.
Fact is, we rarely see Ophelia without her father until after his death, is she herself when he’s not around? Or is her self based entirely on her relationship with her father? The fact that she falls apart at his loss points in that direction.
But all of that is beside the point. Here Gertrude hopes that Ophelia has the power to retrieve Hamlet. It is the only exchange between two women in the play, mad scene excepted.