So I've seen many other issues here about power suddenly stopping along the rail. I've had the same issue and eventually realised this is due to sections of the rails only connecting to 2 or 3 other connections (I believe this is a normal game mechanic with poles). Meaning the power line will usually cut into different networks when there's a lot of rails around (junctions for example). This can be visualised by turning the electricity overlay on the map.
For this reason, I decided to move away from powered rails and use the base mod rails instead. But as I was removing the rails and remaking my base layout, I noticed some leftover ghost rails were visible. It's really bothering me and I can't find a way to get rid of them. This probably happened because of a bug from another mod, where bots can accidentally delete items when placing a floor under it, and this resulted in a deleted rail and an orphaned power line.
Any ideas on how I can fix this on my side?
https://i.imgur.com/bwENVY0.png
https://i.imgur.com/O1fpewl.png
P.S. because of this pole mechanic, it's possible to use the "rail to power connector" as a tool only. if you place it between a rail and a base game pole and then remove it, the rail will now be connected to the pole (assuming the rail has enough connectors still available).