It's something I now hear everywhere, once I heard it a few times.
Take a song like Papa Roach - Between Angels And Insects. As the chord progresses in the first few riffs, there is a repeated melody fragment during each chord - F E G F E F. So you get a Dm overall chord plus this fragment, then Bb plus this fragment and so on until it starts repeating. In other songs the respective fragment doesn't stay the same throughout the entire progression.
To give an example in a completely different genre, take Мария ft. X - Сто нюанса розово - it introduces a melody fragment in the first chord, then reuses it verbatim in the second and fourth chord, but uses something else in the third chord, so it mixes the formula a bit.
It doesn't seem that the melody itself matters, only that it goes well with each chord in the progression. The overall feel is that repeating a melody fragment in several chords makes the melody feel more salient. The usage of repeated melody fragments while the bass changes seems to be a common occurrence in popular music and is apparently commonplace in "hooks" and choruses.
I want to find out what this trope is called and why it works.