TL;DR it's best driving technique to overtake then pass rather than just overtake.
I'm of the view that dawdling while overtaking and passing another nearby vehicle can be a recipe for disaster. Of course, every situation's different, but I want to do everything possible to ensure I'm visible and known to the other driver to be there. Dawdling during closer-proximity just invites Murphy to take an active interest.
One thing I try not to do on the highways is: to pass 18-wheeler semi-trucks on the right. But sometimes it's inevitable that certain routes will dictate that trucks sit in a given lane, and the highway splits off to the left and to the right for other routes. No way around this. But one can definitely flash the headlights a couple of times in that lane to the right, to garner awareness, then pass briskly to get out of that spot alongside the truck. But, yes, even here, perhaps particularly here, it seems to be much safer to pass briskly and to minimize the time spent in the "danger zone."
Most drivers seem to be better able to recognize people are nearby, when briskly overtaking and passing, as opposed to dawdling. If nothing else, dawdling calms people and can eventually (seemingly) lead to loss of awareness a person is there. I tend to use the cruise control on highways, assuming traffic isn't dense enough to be a risk. I'll try to set the speed a good 5-7mph faster or slower than vehicles in a neighboring lane ... depending on which lanes we're speaking of. That way, I'm passing them relatively quickly, reducing time in the visual blind spots and reducing the risk of them losing "interest" in nearby vehicles. I get skittish when on cruise control but where a nearby vehicle adjusts speed to mine, ending up "dawdling" next to me. Good way to get forgotten.
Of course, there's overtaking speeds and there's overtaking speeds. Had a schmuck, the other day, pass me at about 50mph+ over my ~38mph speed (in the 35mph zone of the tricky, dark, two-lane country road. He could easily have had a number of vehicles come out from one of the side roads; luckily that didn't happen. Can't imagine
that sort of driver will ever appreciate safe or sane driving techniques. He's likely to get someone killed, someday.
As others have pointed out, it's appalling and scary what percentage of drivers, out there, seemingly are in it just for themselves ... and to Hades with everybody else. No matter the risk or cost. IMO, the Covid-19 mess (and the attendant loss of control) helped not a bit, as those on the edge seem to have largely gone over it, behavior-wise, many demanding to remain "in control" behind the wheel even if feeling they've lost all control elsewhere in their lives. (The 2021 numbers were awful, up double-digits as compared to the year prior; and, so far, the preliminary 2022 figures seem to have held roughly steady, up roughly double-digits from 2020.)
Funny, but I still hear the old driving school instructors' lessons in my head, ringing away, whenever I'm in a sketchy situation on the road. Their hard-nosed, defensive approaches to driving has saved my bacon on countless occasions over the decades. I often give a nod of thanks in their general direction, whenever safely surviving yet another lunatic-in-proximity moment amongst my fellow drivers.