In Vietnamese songs the tones will generally follow the melodies. Of course sometimes there still be some odd, out-of-tone sounds but most of it is a product of an amateur musician.
As André Müller said in this answer:
In my experience, this is different in other tonal languages, pop songs and chansons in Vietnamese have quite clearly audible tones and especially in slow songs this becomes obvious. You still hear the melodie, but you also hear the ups and downs of the single syllables. As if you simply pitch them higher and lower on the musical scale.
I second what André said about Vietnamese songs: the tones need to match the rise and fall of the melodies (there's more leniency than would be the case for spoken Vietnamese, but not much)
Also according to this paper:
A number of studies are converging on the conclusion that in many tone languages, it is important for the musical melody and the linguistically specified pitch sequences to match in certain ways. That is, there are text-setting constraints that limit the possible combinations of text and melody. These have been found in a number of languages, including Cantonese, Shona, Dinka and Vietnamese. In these languages, roughly speaking, it appears that if the linguistically specified pitch goes up from one syllable to the next, then across those two syllables the musical melody must not go down (and vice-versa). Looked at the other way, if the musical melody goes down from one note to the next, the words must be chosen so that the linguistically specified pitch sequence does not go up on the two corresponding syllables – and vice-versa.
There's more interesting information in the paper that you can reference.