Got route distance 0 between two different GPS locations?

I have two longitude, latitude pairs in coding, which are randomly generated as the following.
location 1: (39.655994758358524, 56.54323616733745)
location 2: (32.44297771882851, 68.10900336760139)
I need to calculate a route between these two positions. Well, I’m facing this route-nodes-length-0 issue. In real world, cars can always go from any given location A to location B. In the modelling, many (if not all) shortest-path algorithm will return 0 if no shortest-path can be found. I guess it is because directed graph is considered and because the map is only a partial map of the real world, and if the two locations are along / near the boundary, then no directed path can be found, not to mention shortest-directed-path. I was wondering, under this situation, say, in my model, I need to work on simulated experimental data (randomly generate two locations from the map), and the shortest-route I found has no nodes. In this case, how to proceed based on your opinion. PS: the julia package I’m using is OpenStreetMapX and OpenStreetMap. Any comments are greatly appreciated.