I tried generating a route between 2 locations in Romania, near the border with Ukraine and Moldova, and the resulting route passes through both neighbouring countries on the way to the destination.
This is the route when Car is selected as the mode of transport:
However, when selecting a different transportation method, like Bike, the route is contained within the Romanian border:
The other transportation options are also inconsistent on whether they cross the border or not.
I have noticed that a similar issue was addressed here, but I don’t know if it is directly related to this.