I have a road in BGR near ROU border which has ROU set as country. Initially thought is caused by countries.geojson and I used another one (Countries - GISCO - Eurostat 1m granularity). The problem is still there and is caused by the fact that GH is using an estimated center on the straight line (attached image).
I was wandering why aren’t you use the first or last point from the way to determine the country? If you agree with this changes I can make a PR with it.