I think I found the solution myself but will post anyway
In my recent playthrough I had my railline to Baku seemingly broken. AI shortly grabbed one of the oilfields.
But afterwards, with the oil ressource still beeing down to 3, I was able to rail operate units through.
Most likely this is wad, as outside of cities the rail counts as intact as long as the hex is in your possession.
Ignoring any underlying ressources.
While in cities the strength of the underlying ressource detemines whether operating is possible or not.
Still it had me puzzled!
https://youtu.be/MNr4aOI1uqE?si=rxV4Nn4nUPvbtmg5&t=988