The loop function in Audacity 3.1.0 has changed significantly. This episode is a deeper dive into those changes and the new attributes of the loop function which are far more complicated than in previous versions.
Here's the link to the video I mentioned in this episode: