Improve retry logic for Stale Element Exceptions