Probably the easiest way.
The beauty of “nearest waypoint” is, that users would understand what is happening, and probably don’t complain - even if they might not like the result.
My concern is the following situation:
At a break along the route, I would stop navigation and maybe even close the app.
My position may be 100m away from route.
Then when I start navigation again, app may route back to a waypoint I have already visited, because the history of visited waypoints has been lost then.
The “nearest waypoint” may be many km back.
“Nearest point on route” would route back only a few 100m, even in corner cases like here