Yes, I see what your final goal is. However, it's not working with both the browsers in the loop. We need to break it down some more to troubleshoot.
We know that Chrome outside the loop works. Now we need to solve the problem with Chrome not working in the loop. First step is to eliminate all extra pieces of the test. Take the Edge test out of the loop for now, and just run the loop with the Chrome test and lets see if that works. That will tell us if there is something in the loop itself that is breaking the Chrome test.
Try and that post the results please.