Let us consider a plain search algorithm (Dijkstra being one example) which will calculate the shortest path from A to B.
Now introduce the additional constraint that the path must be as close as possible to a third point, C, without necessarily going through it (thus breaking down the route into an A–C and a C–B portion would not work).
A real-world example would be “go from Munich to Lyon via Milan”: a human driver would not take this as a requirement to pass through downtown Milan, but would understand that the route over San Bernardino and through the Fréjus tunnel is preferred over the route along the shores of Lac Léman.
For a route graph, this could be phrased as “find the path from A to B which has the least sum of length and shortest distance between C and any point on the path”.
Is there a standard algorithm (or variation of a standard algorithm, Dijkstra preferred) which satisfies that constraint?