ENG-6375 Fix retry logic to address rejoin test failure