Drop your volume hand OR use a little nod of your volume hand when the melody goes up, to avoid unpleasant glissando. When the melody goes down, glissando doesn’t sound that annoying and you may just play legato.