I'm familiar with the technique of drawing this endgame with White:
[fen "8/R4pk1/6p1/7p/7P/6P1/p4PK1/r7 w - - 0 1"]
However, I faced an endgame yesterday that's objectively a draw, but didn't know how to defend it with white:
[fen "3R4/4kp2/6p1/3p3p/7P/3r2P1/5PK1/8 w - - 0 1"]
I didn't know where to put the White rook. The Black king was annoying my rook the whole time and the rook didn't have a wide range to stay behind the pawn. And when I started my lateral checks, the king started marching forward and put more pressure! Then Black continued to push the d pawn and infiltrated with his king and won the endgame. Any feedback with some reasonable lines on how to draw this endgame?