Virus you are also referring to a hand rail, more the smaller round ones right.
Try changing your approach angle it should pretty shallow.
Also you should be landing on the rail around 2-3 feet down the rail, not the very top. Your momentum is carrying you off the far side and when you fall off the same side you ollie on from your not getting your weight fully on the rail, a little bit of `not totally committed`.
If you have fair speed you may have to angle your board to kinda hit the rail then shift your weight up onto the rail. That angle very slight allows your board to absorb some of your forward momentum slowing you down to not slip off the rail.
Hope some of this helped