Did the battle cleared screen come up? Did the mouse appear and not click? Or neither?
If the battle cleared screen does not come up by the time the replay timer goes down (since I assume you used replay timer not equal to 0), the bot will attempt to click replay anyway, but the button will not be there. So it'll fail. You might be able to fix this by increasing replay wait or setting it to 0 (to use DanK's pixel detect).
If it does click the button correctly and still doesn't replay... I dunno, must be a game glitch.
If the mouse moves to the replay button but doesn't seem to click, it could just not be working for you, you'd have to ask DanK to fix that I suppose. Same with if it clicks but does not move to the replay button.
Hope any of that helps.